]> git.baikalelectronics.ru Git - kernel.git/commit
net: FIX bonding sysfs rtnl_lock deadlock
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 13 May 2009 17:02:50 +0000 (17:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 May 2009 05:16:00 +0000 (22:16 -0700)
commitcb2beba81d9f90a18af604811eb0f261dd6089e4
treedd7c3e4e61d4c4bead3c7bd3db17401431e6d87e
parent9addb353d08fc602322338839065c95750f1c2f1
net: FIX bonding sysfs rtnl_lock deadlock

Sysfs files for a network device can not unconditionally take the
rtnl_lock as the bonding sysfs files do.  If someone accesses those
sysfs files while the network device is being unregistered with the
rtnl_lock held we will deadlock.

So use trylock and restart_syscall to avoid this problem.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_sysfs.c