Skip to content

Commit fcd9943

Browse files
Veaceslav Falicodavem330
authored andcommitted
bonding: get netdev_rx_handler_unregister out of locks
Now that netdev_rx_handler_unregister contains synchronize_net(), we need to call it outside of bond->lock, cause it might sleep. Also, remove the already unneded synchronize_net(). Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 118c9a4 commit fcd9943

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,12 +1976,11 @@ static int __bond_release_one(struct net_device *bond_dev,
19761976
return -EINVAL;
19771977
}
19781978

1979+
write_unlock_bh(&bond->lock);
19791980
/* unregister rx_handler early so bond_handle_frame wouldn't be called
19801981
* for this slave anymore.
19811982
*/
19821983
netdev_rx_handler_unregister(slave_dev);
1983-
write_unlock_bh(&bond->lock);
1984-
synchronize_net();
19851984
write_lock_bh(&bond->lock);
19861985

19871986
if (!all && !bond->params.fail_over_mac) {

0 commit comments

Comments
 (0)