bond_release returns EINVAL without releasing the bond lock if the
slave device is not being bonded by the bond.  The following patch
ensures that the lock is released in this case.

Signed-off-by: Stephen J. Bevan <[EMAIL PROTECTED]>
Acked-by: Jay Vosburgh <[EMAIL PROTECTED]>

---

--- linux-2.6.16-rc2/drivers/net/bonding/bond_main.c.orig       2006-02-07 
20:26:08.000000000 -0800
+++ linux-2.6.16-rc2/drivers/net/bonding/bond_main.c    2006-02-07 
20:33:20.447899952 -0800
@@ -1570,6 +1570,7 @@ int bond_release(struct net_device *bond
                printk(KERN_INFO DRV_NAME
                       ": %s: %s not enslaved\n",
                       bond_dev->name, slave_dev->name);
+               write_unlock_bh(&bond->lock);
                return -EINVAL;
        }
 


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to