From: Jay Vosburgh <hidden> Date: 2007-11-06 21:33:36
Two small fixes to bonding for the mainline.
1: Mishandling of RTNL due to what looks like a merge error.
2: Turn off the new validate_addr check when devices are set
up. For backwards compatibility, the bonding master must be able to be
set up with a MAC address of all zeroes.
Patches are against linux-2.6, and apply cleanly
to netdev-2.6#upstream-linus. Please apply for 2.6.24.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
From: Jay Vosburgh <hidden> Date: 2007-11-06 21:33:36
Looks like I incorrectly merged one of the rtnl lock changes,
so that one function, bonding_show_active_slave, held rtnl but didn't
release it, and another, bonding_store_active_slave, never held rtnl but
did release it.
Fixed so the first function doesn't mess with rtnl, and the
second correctly acquires and releases rtnl.
Bug reported by Moni Shoua [off-list ref]
Signed-off-by: Jay Vosburgh <redacted>
---
drivers/net/bonding/bond_sysfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
@@ -1216,7 +1214,9 @@ static ssize_t bonding_store_active_slave(struct device *d,structslave*new_active=NULL;structbonding*bond=to_bond(d);+rtnl_lock();write_lock_bh(&bond->lock);+if(!USES_PRIMARY(bond->params.mode)){printk(KERN_INFODRV_NAME": %s: Unable to change active slave; %s is in mode %d\n",
From: Jay Vosburgh <hidden> Date: 2007-11-06 21:33:43
The standard validate_addr handler refuses to accept the all zeroes address
as valid. However, it's common historical practice for the bonding
master to be configured up prior to having any slaves, at which time the
master will have a MAC address of all zeroes.
Resolved by setting the dev->validate_addr to NULL. The master still can't
end up with an invalid address, as the set_mac_address function tests
for validity.
Signed-off-by: Jay Vosburgh <redacted>
---
drivers/net/bonding/bond_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
From: Moni Shoua <hidden> Date: 2007-11-07 14:45:34
Jay Vosburgh wrote:
Looks like I incorrectly merged one of the rtnl lock changes,
so that one function, bonding_show_active_slave, held rtnl but didn't
release it, and another, bonding_store_active_slave, never held rtnl but
did release it.
Fixed so the first function doesn't mess with rtnl, and the
second correctly acquires and releases rtnl.
Bug reported by Moni Shoua [off-list ref]
I ran some shallow tests and it seems that the patch fixes the problem.
thanks
From: Jeff Garzik <hidden> Date: 2007-11-08 17:47:23
On Tue, Nov 06, 2007 at 01:33:28PM -0800, Jay Vosburgh wrote:
Looks like I incorrectly merged one of the rtnl lock changes,
so that one function, bonding_show_active_slave, held rtnl but didn't
release it, and another, bonding_store_active_slave, never held rtnl but
did release it.
Fixed so the first function doesn't mess with rtnl, and the
second correctly acquires and releases rtnl.
Bug reported by Moni Shoua [off-list ref]
Signed-off-by: Jay Vosburgh <redacted>