]> Git Repo - linux.git/commitdiff
[PATCH] bonding: fix a locking bug in bond_release
authorJay Vosburgh <[email protected]>
Wed, 8 Feb 2006 05:17:22 +0000 (21:17 -0800)
committerJeff Garzik <[email protected]>
Fri, 17 Feb 2006 21:16:39 +0000 (16:16 -0500)
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]>
drivers/net/bonding/bond_main.c

index e0f51afec778ef00bc2d7ecf2c3e28bf454bd549..bcf9f17daf0d36944d5ec362de405e7be718ab08 100644 (file)
@@ -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;
        }
 
This page took 0.060119 seconds and 4 git commands to generate.