From: Jay Vosburgh Date: Wed, 8 Feb 2006 05:17:22 +0000 (-0800) Subject: [PATCH] bonding: fix a locking bug in bond_release X-Git-Tag: MMI-PSA29.97-13-9~51960^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5e2a7b22e7d7dfda8794906d0fddeaaa09bb944;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] bonding: fix a locking bug in bond_release 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 Acked-by: Jay Vosburgh Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e0f51afec778..bcf9f17daf0d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1581,6 +1581,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) printk(KERN_INFO DRV_NAME ": %s: %s not enslaved\n", bond_dev->name, slave_dev->name); + write_unlock_bh(&bond->lock); return -EINVAL; }