team: move dev_mc_sync after master_upper_dev_link in team_port_add
authorXin Long <lucien.xin@gmail.com>
Sun, 25 Mar 2018 17:25:06 +0000 (01:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:31:21 +0000 (12:31 +0200)
commita17ab0a5c81cd646d7cc14e54dd97aa1205e3ab4
tree3e117b3342cfa79e87b47ee030bea816aa8df07d
parent0f9e7b328bffb71c41e2b26fd2984b6f3e3e0527
team: move dev_mc_sync after master_upper_dev_link in team_port_add

[ Upstream commit 982cf3b3999d39a2eaca0a65542df33c19b5d814 ]

The same fix as in 'bonding: move dev_mc_sync after master_upper_dev_link
in bond_enslave' is needed for team driver.

The panic can be reproduced easily:

  ip link add team1 type team
  ip link set team1 up
  ip link add link team1 vlan1 type vlan id 80
  ip link set vlan1 master team1

Fixes: cb41c997d444 ("team: team should sync the port's uc/mc addrs when add a port")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/team/team.c