aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-07-30 13:30:46 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-08-04 15:27:36 -0400
commit02f5ba5bac8b374bc2126920c7204c63019f28ce (patch)
tree47f498455ce5b765ca7253dc3e78b60cd47de394 /drivers
parentphy/marvell: add 88ec048 support (diff)
downloadlinux-dev-02f5ba5bac8b374bc2126920c7204c63019f28ce.tar.xz
linux-dev-02f5ba5bac8b374bc2126920c7204c63019f28ce.zip
iwlwifi: fix possible recursive locking deadlock
commit f84b29ec0a1ab767679d3f2428877b65f94bc3ff Author: Johannes Berg <johannes.berg@intel.com> Date: Tue May 18 02:29:13 2010 -0700 iwlwifi: queue user-initiated scan when doing internal scan introduced a potential deadlock because it calls ieee80211_scan_completed() with the priv->mutex held, but mac80211 may call back into iwlwifi which would lead to recursive locking. Move this out from under the mutex. Cc: stable@kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 8024d44ce4bb..8ccb6d205b6d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2000,6 +2000,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct iwl_priv *priv = hw->priv;
+ bool scan_completed = false;
IWL_DEBUG_MAC80211(priv, "enter\n");
@@ -2013,7 +2014,7 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
if (priv->vif == vif) {
priv->vif = NULL;
if (priv->scan_vif == vif) {
- ieee80211_scan_completed(priv->hw, true);
+ scan_completed = true;
priv->scan_vif = NULL;
priv->scan_request = NULL;
}
@@ -2021,6 +2022,9 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
}
mutex_unlock(&priv->mutex);
+ if (scan_completed)
+ ieee80211_scan_completed(priv->hw, true);
+
IWL_DEBUG_MAC80211(priv, "leave\n");
}