diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2012-07-18 18:11:29 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-18 17:03:15 +0200 |
commit | ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f (patch) | |
tree | 0459843c65d4fd3b28647da97cd37549f69f423d /net/wireless/reg.c | |
parent | 88bc40e8c3d3bca7d26c756bb0b823d4abad3355 (diff) | |
download | linux-ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f.tar.gz linux-ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f.tar.bz2 linux-ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f.zip |
cfg80211: Fix mutex locking in reg_last_request_cell_base
should fix the following issue
[ 3229.815012] [ BUG: lock held when returning to user space! ]
[ 3229.815016] 3.5.0-rc7-wl #28 Tainted: G W O
[ 3229.815017]
------------------------------------------------
[ 3229.815019] wpa_supplicant/5783 is leaving the kernel with locks still held!
[ 3229.815022] 1 lock held by wpa_supplicant/5783:
[ 3229.815023] #0: (reg_mutex){+.+.+.}, at: [<fa65834d>]
reg_last_request_cell_base+0x1d/0x60 [cfg80211]
Cc: Luis Rodriguez <mcgrof@gmail.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tested-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index dbb01df3aacb..2303ee73b50a 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -929,11 +929,13 @@ static bool reg_request_cell_base(struct regulatory_request *request) bool reg_last_request_cell_base(void) { + bool val; assert_cfg80211_lock(); mutex_lock(®_mutex); - return reg_request_cell_base(last_request); + val = reg_request_cell_base(last_request); mutex_unlock(®_mutex); + return val; } #ifdef CONFIG_CFG80211_CERTIFICATION_ONUS |