]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix possible sta-debugfs work lockup
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 3 Apr 2008 12:31:05 +0000 (14:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Apr 2008 20:44:41 +0000 (16:44 -0400)
commit36921d2e64c0a116d6353ea15fdab743712a630b
tree1defae1fef6cdff58ae0420d4d269d721e5de364
parent91a51643fb0844302ab97fc8b1701c138cfbc8af
mac80211: fix possible sta-debugfs work lockup

Because we queue the sta-debugfs-adding work on our mac80211
workqueue (which needs to be flushed under RTNL) and that work
needs the RTNL, it can currently deadlock, thanks to Reinette
Chatre for pointing out the lockdep warning about this.

This patch fixes it by moving this work to the common kernel
workqueue (using schedule_work) and canceling it as appropriate.

It also fixes a related problem: When a STA is pinned by the
debugfs adding work and sta_info_flush() runs concurrently
it is not guaranteed that all STAs are removed from the driver
before the corresponding interface is removed which may lead
to bugs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/sta_info.c