linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH wireless-2.6] rt2x00: fix rmmod crash
@ 2011-05-29 10:45 Stanislaw Gruszka
  2011-05-29 16:48 ` Gertjan van Wingerde
  2011-05-30 18:25 ` Ivo Van Doorn
  0 siblings, 2 replies; 11+ messages in thread
From: Stanislaw Gruszka @ 2011-05-29 10:45 UTC (permalink / raw)
  To: Ivo van Doorn, Gertjan van Wingerde, Helmut Schaa; +Cc: linux-wireless

Do not destroy workqueue, which still can be used by autowakeup_work,
before ieee80211_unregister_hw() is called.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index c018d67..2f2627b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1165,7 +1165,6 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
 		cancel_work_sync(&rt2x00dev->rxdone_work);
 		cancel_work_sync(&rt2x00dev->txdone_work);
 	}
-	destroy_workqueue(rt2x00dev->workqueue);
 
 	/*
 	 * Free the tx status fifo.
@@ -1198,6 +1197,11 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
 	rt2x00lib_remove_hw(rt2x00dev);
 
 	/*
+	 * Now nobody use workqueue anymore.
+	 */
+	destroy_workqueue(rt2x00dev->workqueue);
+
+	/*
 	 * Free firmware image.
 	 */
 	rt2x00lib_free_firmware(rt2x00dev);
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-06-02 17:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-29 10:45 [PATCH wireless-2.6] rt2x00: fix rmmod crash Stanislaw Gruszka
2011-05-29 16:48 ` Gertjan van Wingerde
2011-05-29 20:42   ` Stanislaw Gruszka
2011-05-30  6:24     ` Gertjan van Wingerde
2011-05-30  9:52       ` Stanislaw Gruszka
2011-05-30 11:26         ` Gertjan van Wingerde
2011-05-30 12:52           ` Stanislaw Gruszka
2011-05-30 13:42             ` Gertjan van Wingerde
2011-05-30 18:25 ` Ivo Van Doorn
2011-05-31  9:32   ` Stanislaw Gruszka
2011-06-02 17:23     ` Ivo Van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).