summaryrefslogtreecommitdiff
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorJay Vosburgh <fubar@us.ibm.com>2006-02-08 05:17:22 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2006-02-17 21:16:39 (GMT)
commitf5e2a7b22e7d7dfda8794906d0fddeaaa09bb944 (patch)
tree4df9bb7fd503f2a409cd4ef9d94cddcc2a1db6d0 /drivers/net/bonding
parent66cc5d5aee1ea427b3aeacdabd006a4195c81eee (diff)
downloadlinux-fsl-qoriq-f5e2a7b22e7d7dfda8794906d0fddeaaa09bb944.tar.xz
[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 <stephen@dino.dnsalias.com> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index e0f51af..bcf9f17 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;
}