projects/linux·commit f5e2a7b2

[PATCH] bonding: fix a locking bug in bond_release

f5e2a7b2 · Jay Vosburgh <[email protected]> · 2006-02-07 21:17:22 -08:00

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]>
Signed-off-by: Jeff Garzik <[email protected]>
Commit
f5e2a7b22e7d7dfda8794906d0fddeaaa09bb944
Parents
66cc5d5a

Changes

1 files changed · +1 −0

FileStatusAddDelContent
drivers/net/bonding/bond_main.cmodified+1−0View file

drivers/net/bonding/bond_main.c

View file
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;
}