]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix deadlock during reg chan check
authorArik Nemtsov <arik@wizery.com>
Mon, 29 Dec 2014 09:59:59 +0000 (11:59 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 7 Jan 2015 13:53:46 +0000 (14:53 +0100)
commit28bd908da836c727848c9173d3ed3d91902d6983
tree72350c26228cf39c5df69d0a975c05c8736f906a
parentb1aac1f4efa73f9cc50c405cc82a9219ac38106e
cfg80211: fix deadlock during reg chan check

If a P2P GO is active, the cfg80211_reg_can_beacon function will take
the wdev lock, in its call to cfg80211_go_permissive_chan. But the wdev lock
is already taken by the parent channel-checking function, causing a
deadlock.
Split the checking code into two parts. The first part will check if the
wdev is active and saves the channel under the wdev lock. The second part
will check actual channel validity according to type.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/reg.c