]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
nl80211: rework locking
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 12 Mar 2009 08:55:09 +0000 (09:55 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Mar 2009 00:12:56 +0000 (20:12 -0400)
commit3b85875a252dbbd95c2e04d73639719a0a79634e
tree573142df787d9ccd52944695478546f543489504
parent8f655dde240293f3b82313cae91c64ffd7b64c50
nl80211: rework locking

When I added scanning to cfg80211, we got a lock dependency like this:
rtnl --> cfg80211_mtx

nl80211, on the other hand, has the reverse lock dependency:
cfg80211_mtx --> rtnl

which clearly is a bad idea. This patch reworks nl80211 to take these
two locks in the other order to fix the possible, and easily
triggerable, deadlock.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/nl80211.c