From 626b29e5e1c72b403300439f3b3884733e8d5926 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Thu, 19 Jul 2012 17:25:29 -0700 Subject: [PATCH] compat-wireless: merge a pending reg fix onto linux-next-pending/ This merge this patch onto linux-next-pending/ commit ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f Author: Mohammed Shafi Shajakhan Date: Wed Jul 18 18:11:29 2012 +0530 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: [] reg_last_request_cell_base+0x1d/0x60 [cfg80211] Cc: Luis Rodriguez Signed-off-by: Mohammed Shafi Shajakhan Tested-by: Luciano Coelho Signed-off-by: Johannes Berg Signed-off-by: Luis R. Rodriguez --- ...ex-locking-in-reg_last_request_cell_.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 linux-next-pending/0001-cfg80211-Fix-mutex-locking-in-reg_last_request_cell_.patch diff --git a/linux-next-pending/0001-cfg80211-Fix-mutex-locking-in-reg_last_request_cell_.patch b/linux-next-pending/0001-cfg80211-Fix-mutex-locking-in-reg_last_request_cell_.patch new file mode 100644 index 000000000000..d48c19a48e37 --- /dev/null +++ b/linux-next-pending/0001-cfg80211-Fix-mutex-locking-in-reg_last_request_cell_.patch @@ -0,0 +1,46 @@ +From ebd0fd2b1a30aa836c28e758d8a57ecdfa85052f Mon Sep 17 00:00:00 2001 +From: Mohammed Shafi Shajakhan +Date: Wed, 18 Jul 2012 18:11:29 +0530 +Subject: [PATCH] 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: [] + reg_last_request_cell_base+0x1d/0x60 [cfg80211] + +Cc: Luis Rodriguez +Signed-off-by: Mohammed Shafi Shajakhan +Tested-by: Luciano Coelho +Signed-off-by: Johannes Berg +--- + net/wireless/reg.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/net/wireless/reg.c b/net/wireless/reg.c +index dbb01df..2303ee7 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 +-- +1.7.10.rc1.22.gf5241 + -- 2.30.2