Subject: Re: [patch for 2.6.24? 1/1] bonding: locking fix

From: Andrew Morton <[email-masked]>
Date: Thu, 17 Jan 2008 15:42:43 -0800

On Mon, 14 Jan 2008 15:01:13 -0800
Jay Vosburgh <[email-masked]> wrote:

> Andrew Morton <[email-masked]> wrote:
> [...]
> >That's bond_lock.
> >
> >This patch (below) addresses what appears to me to be an obvious
> >imbalance in rtnl_lock.
> >
> >I don't care how it's fixed, really.  Someone please fix it?
> 
> 	I posted a correct patch for this a few days ago:
> 
> http://marc.info/?l=linux-netdev&m=119975746803886&w=2
> 
> 	The correct fix requires more than simply removing the rtnl calls.
> 
> 	I've got a few other patches in the pipeline, so I'm planning to
> repost the set the above patch was a part of plus a few others, most
> likely tomorrow.

Can we get this bug fixed please?  Today?  It has been known about for more
than two months.

I can only assume that people don't use this feature much because this bug
will kill your kernel, every time.

Applying this:

--- a/drivers/net/bonding/bond_sysfs.c~bonding-locking-fix
+++ a/drivers/net/bonding/bond_sysfs.c
@@ -1111,8 +1111,6 @@ static ssize_t bonding_store_primary(str
 out:
 	write_unlock_bh(&bond->lock);
 
-	rtnl_unlock();
-
 	return count;
 }
 static DEVICE_ATTR(primary, S_IRUGO | S_IWUSR, bonding_show_primary, bonding_store_primary);

is better than doing nothing.