]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix potential deadlock regression
authorJohannes Berg <johannes.berg@intel.com>
Tue, 4 Jun 2013 17:21:08 +0000 (19:21 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 4 Jun 2013 20:22:41 +0000 (22:22 +0200)
commitabb1675420cf5f99feba38bcea20cce0a21d56b9
tree9b8e1290e91ee99bfc9edc88a5e7bcf500f64e70
parentd0af4de6620fca0cc507f1f429374f3707995a27
cfg80211: fix potential deadlock regression

My big locking cleanups caused a problem by registering the
rfkill instance with the RTNL held, while the callback also
acquires the RTNL. This potentially causes a deadlock since
the two locks used (rfkill mutex and RTNL) can be acquired
in two different orders. Fix this by (un)registering rfkill
without holding the RTNL. This needs to be done after the
device struct is registered, but that can also be done w/o
holding the RTNL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c