Commit 815bcc27 authored by Jay Vosburgh's avatar Jay Vosburgh Committed by David S. Miller

bonding: fix alb mode locking regression

Fix locking issue in alb MAC address management; removed
incorrect locking and replaced with correct locking.  This bug was
introduced in commit 059fe7a5
("bonding: Convert locks to _bh, rework alb locking for new locking")

	Bug reported by Paul Smith <>, who also
tested the fix.
Signed-off-by: default avatarJay Vosburgh <>
Signed-off-by: default avatarDavid S. Miller <>
parent 9f722c09
......@@ -1706,10 +1706,8 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
* Called with RTNL
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
struct bonding *bond = netdev_priv(bond_dev);
struct sockaddr *sa = addr;
......@@ -1745,9 +1743,6 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
if (swap_slave) {
alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
......@@ -1755,16 +1750,15 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr,
alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr);
if (bond->alb_info.rlb_enabled) {
/* inform clients mac address has changed */
rlb_req_update_slave_clients(bond, bond->curr_active_slave);
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment