Skip to content

Commit

Permalink
mac80211: delete work timer
Browse files Browse the repository at this point in the history
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).

Cc: stable@kernel.org [2.6.34+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Aug 30, 2010
1 parent f880c20 commit 071249b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,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);
Expand Down

0 comments on commit 071249b

Please sign in to comment.