Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fcd99434 authored by Veaceslav Falico's avatar Veaceslav Falico Committed by David S. Miller
Browse files

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: default avatarVeaceslav Falico <vfalico@redhat.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 118c9a45
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1976,12 +1976,11 @@ static int __bond_release_one(struct net_device *bond_dev,
		return -EINVAL;
		return -EINVAL;
	}
	}


	write_unlock_bh(&bond->lock);
	/* unregister rx_handler early so bond_handle_frame wouldn't be called
	/* unregister rx_handler early so bond_handle_frame wouldn't be called
	 * for this slave anymore.
	 * for this slave anymore.
	 */
	 */
	netdev_rx_handler_unregister(slave_dev);
	netdev_rx_handler_unregister(slave_dev);
	write_unlock_bh(&bond->lock);
	synchronize_net();
	write_lock_bh(&bond->lock);
	write_lock_bh(&bond->lock);


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