linux/drivers/net/team
Hangbin Liu 925b0c841e team: fix possible recursive locking when add slaves
If we add a bond device which is already the master of the team interface,
we will hold the team->lock in team_add_slave() first and then request the
lock in team_set_mac_address() again. The functions are called like:

- team_add_slave()
 - team_port_add()
   - team_port_enter()
     - team_modeop_port_enter()
       - __set_port_dev_addr()
         - dev_set_mac_address()
           - bond_set_mac_address()
             - dev_set_mac_address()
  	       - team_set_mac_address

Although team_upper_dev_link() would check the upper devices but it is
called too late. Fix it by adding a checking before processing the slave.

v2: Do not split the string in netdev_err()

Fixes: 3d249d4ca7 ("net: introduce ethernet teaming device")
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-19 14:57:35 -07:00
..
Kconfig team: introduce random mode 2013-03-06 14:55:20 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
team.c team: fix possible recursive locking when add slaves 2019-04-19 14:57:35 -07:00
team_mode_activebackup.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00
team_mode_broadcast.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00
team_mode_loadbalance.c team: Free BPF filter when unregistering netdev 2019-03-04 10:57:29 -08:00
team_mode_random.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00
team_mode_roundrobin.c team: add macro MODULE_ALIAS_TEAM_MODE for team mode alias 2017-06-02 10:20:49 -04:00