summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-25 14:47:38 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-20 13:36:15 -0700
commit58b29725e5bd74da734c6f3fd1eac934a8fed73e (patch)
tree695df314415e8fe63c7d6131425300e2b4ce1ab7 /net
parentb7a83862f3f9b3b95719a5c3dafacdf2bb52ddda (diff)
downloadkernel-common-58b29725e5bd74da734c6f3fd1eac934a8fed73e.tar.gz
kernel-common-58b29725e5bd74da734c6f3fd1eac934a8fed73e.tar.bz2
kernel-common-58b29725e5bd74da734c6f3fd1eac934a8fed73e.zip
mac80211: delete work timer
commit 071249b1d501b1f31a6b1af3fbcbe03158a84e5c upstream. The new workqueue changes helped me find this bug that's been lingering since the changes to the work processing in mac80211 -- the work timer is never deleted properly. Do that to avoid having it fire after all data structures have been freed. It can't be re-armed because all it will do, if running, is schedule the work, but that gets flushed later and won't have anything to do since all work items are gone by now (by way of interface removal). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 22a384dfab65..52f15fe6f0ed 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -659,6 +659,12 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
rtnl_unlock();
+ /*
+ * Now all work items will be gone, but the
+ * timer might still be armed, so delete it
+ */
+ del_timer_sync(&local->work_timer);
+
cancel_work_sync(&local->reconfig_filter);
ieee80211_clear_tx_pending(local);