From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Tue, 2 Apr 2013 14:13:35 -0700 > On Mon, Apr 01, 2013 at 09:40:55PM -0400, David Miller wrote: >> >> Please queue up the following networking bug fixes for 3.0.x, >> 3.2.x, 3.4.x, and 3.8.x -stable respectively. > > Applied the 3.0, 3.4 and 3.8-stable patches. Greg and Ben, the attached patch (which is now in Linus's tree) is needed to supplement commit: net: add a synchronize_net() innetdev_rx_handler_unregister() which I submitted 2 days ago. I verified that it applies cleanly to all the -stable branches (3.0.x, 3.2.x, 3.4.x, 3.8.x). Thanks!
>From 81c86d8de2fde1b668fa7d9f3221e15ce90005cf Mon Sep 17 00:00:00 2001 From: Veaceslav Falico <vfalico@xxxxxxxxxx> Date: Tue, 2 Apr 2013 05:15:16 +0000 Subject: [PATCH] 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@xxxxxxxxxx> Acked-by: Eric Dumazet <edumazet@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> --- drivers/net/bonding/bond_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 272f81a..27cdf1f 100644 --- 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_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) { -- 1.7.11.7