Commit ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f
Committed by
Johannes Berg
1 parent
88bc40e8c3
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
net/wireless/reg.c
... | ... | @@ -929,11 +929,13 @@ |
929 | 929 | |
930 | 930 | bool reg_last_request_cell_base(void) |
931 | 931 | { |
932 | + bool val; | |
932 | 933 | assert_cfg80211_lock(); |
933 | 934 | |
934 | 935 | mutex_lock(®_mutex); |
935 | - return reg_request_cell_base(last_request); | |
936 | + val = reg_request_cell_base(last_request); | |
936 | 937 | mutex_unlock(®_mutex); |
938 | + return val; | |
937 | 939 | } |
938 | 940 | |
939 | 941 | #ifdef CONFIG_CFG80211_CERTIFICATION_ONUS |