From 0c5b920e4ac51ed15d773bc064cb653d7f854b0a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 3 Apr 2013 09:02:00 -0700 Subject: [PATCH] 3.8-stable patches added patches: bonding-get-netdev_rx_handler_unregister-out-of-locks.patch --- ...v_rx_handler_unregister-out-of-locks.patch | 38 +++++++++++++++++++ queue-3.8/series | 1 + 2 files changed, 39 insertions(+) create mode 100644 queue-3.8/bonding-get-netdev_rx_handler_unregister-out-of-locks.patch diff --git a/queue-3.8/bonding-get-netdev_rx_handler_unregister-out-of-locks.patch b/queue-3.8/bonding-get-netdev_rx_handler_unregister-out-of-locks.patch new file mode 100644 index 00000000000..75ad6474ee9 --- /dev/null +++ b/queue-3.8/bonding-get-netdev_rx_handler_unregister-out-of-locks.patch @@ -0,0 +1,38 @@ +From 81c86d8de2fde1b668fa7d9f3221e15ce90005cf Mon Sep 17 00:00:00 2001 +From: Veaceslav Falico +Date: Tue, 2 Apr 2013 05:15:16 +0000 +Subject: bonding: get netdev_rx_handler_unregister out of locks + +From: Veaceslav Falico + +[ 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 +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/bonding/bond_main.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/net/bonding/bond_main.c ++++ b/drivers/net/bonding/bond_main.c +@@ -1955,12 +1955,11 @@ int bond_release(struct net_device *bond + 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) { diff --git a/queue-3.8/series b/queue-3.8/series index 0d4bd0ab748..49e04042bb7 100644 --- a/queue-3.8/series +++ b/queue-3.8/series @@ -122,3 +122,4 @@ net-fix-the-use-of-this_cpu_ptr.patch net-fq_codel-fix-off-by-one-error.patch pch_gbe-fix-ip_summed-checksum-reporting-on-rx.patch smsc75xx-fix-jumbo-frame-support.patch +bonding-get-netdev_rx_handler_unregister-out-of-locks.patch -- 2.47.3