aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@redhat.com>2013-04-02 05:15:16 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-05 10:16:54 -0700
commitf6cab49c7b11abf9595b1bf9b6ff73931c832e2e (patch)
treeb98d1c5db674c6bd612ae0235558dbab5de4ecee
parent31f516f1f359bed25b6f6ebe5752326145303b3c (diff)
downloadlinux-linaro-stable-f6cab49c7b11abf9595b1bf9b6ff73931c832e2e.tar.gz
bonding: get netdev_rx_handler_unregister out of locks
[ Upstream commit fcd99434fb5c137274d2e15dd2a6a7455f0f29ff ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/bonding/bond_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6f8b2688d27e..dd433a748e2e 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2017,12 +2017,11 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
return -EINVAL;
}
+ write_unlock_bh(&bond->lock);
/* unregister rx_handler early so bond_handle_frame wouldn't be called
* for this slave anymore.
*/
netdev_rx_handler_unregister(slave_dev);
- write_unlock_bh(&bond->lock);
- synchronize_net();
write_lock_bh(&bond->lock);
if (!bond->params.fail_over_mac) {