diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2010-08-22 17:48:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:33:20 -0400 |
commit | 258086a48b766d12a500f98834654ffa927ca475 (patch) | |
tree | 95090b63fbd9643693a8fe2e85b218356815bd4b /net/mac80211/main.c | |
parent | 11791a6f7534906b4a01ffb54ba0b02ca39398ef (diff) |
mac80211: cancel restart_work in ieee80211_unregister_hw
Unlike most other workqueue-tasks, the restart_work is
not scheduled onto mac80211's private per-interface
workqueue, but onto one of the system-wide workqueues.
Therefore the mac80211-stack has to cancel any pending
restarts, before destroying the shared device context
and handing back the memory. Otherwise - under very
unlucky circumstances - there could be a stale work-
item left, because some other kernel component might
have delayed the execution of ieee80211_restart_work
for too long.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 5756fba63d48..28415de5f476 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -807,6 +807,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
807 | 807 | ||
808 | rtnl_unlock(); | 808 | rtnl_unlock(); |
809 | 809 | ||
810 | cancel_work_sync(&local->restart_work); | ||
810 | cancel_work_sync(&local->reconfig_filter); | 811 | cancel_work_sync(&local->reconfig_filter); |
811 | 812 | ||
812 | ieee80211_clear_tx_pending(local); | 813 | ieee80211_clear_tx_pending(local); |