Skip to contentSkip to conversation

mac80211: delete work timer

PATCH New Johannes Berg 1 participant 1 message Aug 25, 2010 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: delete work timer

From: Johannes Berg <[email protected]>

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).

---
This might clash with Christian's fix? But the fixup should be easy.

 net/mac80211/main.c |    6 ++++++
 1 file changed, 6 insertions(+)
net/mac80211/main.c +6 -0
@@ -812,6 +812,12 @@ void ieee80211_unregister_hw(struct ieee
 
 	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);