From aef00c15b8c503083a703900a755fdb1cf2436e0 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Wed, 10 Feb 2016 11:49:38 +0100 Subject: mac802154: Fixes kernel oops when unloading a radio driver Destroying the workqueue before unregistering the net device caused a kernel oops Signed-off-by: Koen Zandberg Acked-by: Alexander Aring Signed-off-by: Marcel Holtmann --- net/mac802154/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/main.c b/net/mac802154/main.c index e8cab5bb80c6..87da85ae5a6b 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); -- cgit v1.2.3