diff mbox

[PATCHv2,bluetooth-next] mac802154: Fixes kernel oops when unloading a radio driver

Message ID 1455101378-2225-1-git-send-email-koen@bergzand.net (mailing list archive)
State Accepted
Headers show

Commit Message

Koen Zandberg Feb. 10, 2016, 10:49 a.m. UTC
Destroying the workqueue before unregistering the net device caused a
kernel oops

Signed-off-by: Koen Zandberg <koen@bergzand.net>
---
 net/mac802154/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander Aring Feb. 15, 2016, 10:19 p.m. UTC | #1
Hi Koen,

Am 02/10/2016 um 11:49 AM schrieb Koen Zandberg:
> Destroying the workqueue before unregistering the net device caused a
> kernel oops
>
> Signed-off-by: Koen Zandberg <koen@bergzand.net>

Acked-by: Alexander Aring <aar@pengutronix.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcel Holtmann Feb. 21, 2016, 12:22 a.m. UTC | #2
Hi Koen,

> Destroying the workqueue before unregistering the net device caused a
> kernel oops
> 
> Signed-off-by: Koen Zandberg <koen@bergzand.net>
> ---
> net/mac802154/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index e8cab5b..87da85a 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -218,7 +218,6 @@  void ieee802154_unregister_hw(struct ieee802154_hw *hw)
 
 	tasklet_kill(&local->tasklet);
 	flush_workqueue(local->workqueue);
-	destroy_workqueue(local->workqueue);
 
 	rtnl_lock();
 
@@ -226,6 +225,7 @@  void ieee802154_unregister_hw(struct ieee802154_hw *hw)
 
 	rtnl_unlock();
 
+	destroy_workqueue(local->workqueue);
 	wpan_phy_unregister(local->phy);
 }
 EXPORT_SYMBOL(ieee802154_unregister_hw);