Skip to content

Commit

Permalink
cfg80211: Fix mutex locking in reg_last_request_cell_base
Browse files Browse the repository at this point in the history
should fix the following issue

	[ 3229.815012] [ BUG: lock held when returning to user space! ]
	[ 3229.815016] 3.5.0-rc7-wl torvalds#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>
  • Loading branch information
Mohammed Shafi Shajakhan authored and jmberg-intel committed Jul 18, 2012
1 parent 88bc40e commit ebd0fd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(&reg_mutex);
return reg_request_cell_base(last_request);
val = reg_request_cell_base(last_request);
mutex_unlock(&reg_mutex);
return val;
}

#ifdef CONFIG_CFG80211_CERTIFICATION_ONUS
Expand Down

0 comments on commit ebd0fd2

Please sign in to comment.