aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-07 03:21:36 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-16 16:27:10 -0400
commit88be026490ed89c2ffead81a52531fbac5507e01 (patch)
tree94f8727e5027a09f24623bd4dcecbbbe1be6922a /drivers/net/wireless/iwlwifi/iwl-agn.c
parent8b9fce77737ae9983f61ec56cd53f52fb738b2c7 (diff)
iwlwifi: fix scan races
When an internal scan is started, nothing protects the is_internal_short_scan variable which can cause crashes, cf. https://bugzilla.kernel.org/show_bug.cgi?id=15667. Fix this by making the short scan request use the mutex for locking, which requires making the request go to a work struct so that it can sleep. Reported-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index e4c2e1e448ad..ba0fdba602cd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3330,6 +3330,7 @@ static void iwl_cancel_deferred_work(struct iwl_priv *priv)
3330 3330
3331 cancel_delayed_work_sync(&priv->init_alive_start); 3331 cancel_delayed_work_sync(&priv->init_alive_start);
3332 cancel_delayed_work(&priv->scan_check); 3332 cancel_delayed_work(&priv->scan_check);
3333 cancel_work_sync(&priv->start_internal_scan);
3333 cancel_delayed_work(&priv->alive_start); 3334 cancel_delayed_work(&priv->alive_start);
3334 cancel_work_sync(&priv->beacon_update); 3335 cancel_work_sync(&priv->beacon_update);
3335 del_timer_sync(&priv->statistics_periodic); 3336 del_timer_sync(&priv->statistics_periodic);