From: Koen Zandberg Date: Wed, 10 Feb 2016 10:49:38 +0000 (+0100) Subject: mac802154: Fixes kernel oops when unloading a radio driver X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=aef00c15b8c503083a703900a755fdb1cf2436e0;p=linux.git 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 --- diff --git a/net/mac802154/main.c b/net/mac802154/main.c index e8cab5bb80c66..87da85ae5a6b1 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);