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

From: Andrew Morton <[email-masked]>
Date: Mon, 14 Jan 2008 14:47:54 -0800

(cc's added)

On Mon, 14 Jan 2008 23:14:25 +0100 (CET)
Krzysztof Oledzki <[email-masked]> wrote:

> 
> 
> On Mon, 14 Jan 2008, [email-masked] wrote:
> 
> > From: Andrew Morton <[email-masked]>
> >
> > Remove stray rtnl_unlock().
> >
> > Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9542
> >
> > Cc: "David S. Miller" <[email-masked]>
> > Cc: Stephen Hemminger <[email-masked]>
> > Cc: Krzysztof Oledzki <[email-masked]>
> > Signed-off-by: Andrew Morton <[email-masked]>
> > ---
> >
> > drivers/net/bonding/bond_sysfs.c |    2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff -puN drivers/net/bonding/bond_sysfs.c~bonding-locking-fix drivers/net/bonding/bond_sysfs.c
> > --- 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);
> > _
> >
> 
> http://thread.gmane.org/gmane.linux.network/82566/focus=83142
> 

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?

From: Andrew Morton <[email-masked]>

Remove stray rtnl_unlock().

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9542

Cc: "David S. Miller" <[email-masked]>
Cc: Stephen Hemminger <[email-masked]>
Cc: Krzysztof Oledzki <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/net/bonding/bond_sysfs.c |    2 --
 1 file changed, 2 deletions(-)

diff -puN drivers/net/bonding/bond_sysfs.c~bonding-locking-fix drivers/net/bonding/bond_sysfs.c
--- 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);
_