提交 f5e2a7b2 编写于 作者: J Jay Vosburgh 提交者: Jeff Garzik

[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: NStephen J. Bevan <stephen@dino.dnsalias.com>
Acked-by: NJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 66cc5d5a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册