From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Ivo van Doorn <IvDoorn@gmail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>,
Helmut Schaa <helmut.schaa@googlemail.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH wireless-2.6] rt2x00: fix rmmod crash
Date: Sun, 29 May 2011 12:45:29 +0200 [thread overview]
Message-ID: <20110529104529.GA2769@localhost.localdomain> (raw)
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
next reply other threads:[~2011-05-29 10:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-29 10:45 Stanislaw Gruszka [this message]
2011-05-29 16:48 ` [PATCH wireless-2.6] rt2x00: fix rmmod crash 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110529104529.GA2769@localhost.localdomain \
--to=stf_xl@wp.pl \
--cc=IvDoorn@gmail.com \
--cc=gwingerde@gmail.com \
--cc=helmut.schaa@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).