team: call netdev_change_features out of team lock
authorXin Long <lucien.xin@gmail.com>
Thu, 6 Apr 2017 05:41:28 +0000 (13:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Apr 2017 20:56:49 +0000 (13:56 -0700)
commit16cf72bb085626ae1323e59985d6cbb58a8f71d8
tree50a8e04f54c5307ede1fb4bb1939dace5e99c2e1
parent34b2789f1d9bf8dcca9b5cb553d076ca2cd898ee
team: call netdev_change_features out of team lock

Commit f6988cb63a4e ("team: don't call netdev_change_features under
team->lock") fixed the issue calling netdev_change_features under
team->lock for team_compute_features.

But there are still two places where it calls netdev_change_features
under team->lock, team_port_add and team_port_del. It may cause a
dead lock when the slave port with LRO enabled is added.

This patch is to fix this dead lock by moving netdev_change_features
out of team_port_add and team_port_del, and call it after unlocking
the team lock.

Reported-by: Patrick Talbert <ptalbert@redhat.com>
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>
drivers/net/team/team.c