]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
bonding: fix lock ordering for rtnl and bonding_rwsem
authorJay Vosburgh <fubar@us.ibm.com>
Fri, 18 Jan 2008 00:25:02 +0000 (16:25 -0800)
committerJeff Garzik <jeff@garzik.org>
Fri, 18 Jan 2008 19:38:39 +0000 (14:38 -0500)
commit027ea0416c955778ceca7ef82e48a1dd6b4617c9
treead823fb28b414d948fc372a08c8c15cee31bd8e1
parentece95f7fefe3afae19e641e1b3f5e64b00d5b948
bonding: fix lock ordering for rtnl and bonding_rwsem

Fix the handling of rtnl and the bonding_rwsem to always be acquired
in a consistent order (rtnl, then bonding_rwsem).

The existing code sometimes acquired them in this order, and sometimes
in the opposite order, which opens a window for deadlock between ifenslave
and sysfs.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_sysfs.c