Skip to content

Commit

Permalink
[PATCH] bonding: fix a locking bug in bond_release
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jay Vosburgh authored and jgarzik committed Feb 17, 2006
1 parent 66cc5d5 commit f5e2a7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/bonding/bond_main.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit f5e2a7b

Please sign in to comment.