Skip to content

Commit aef00c1

Browse files
bergzandholtmann
authored andcommitted
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 <koen@bergzand.net> Acked-by: Alexander Aring <aar@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent 6367551 commit aef00c1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/mac802154/main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,14 +218,14 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw)
218218

219219
tasklet_kill(&local->tasklet);
220220
flush_workqueue(local->workqueue);
221-
destroy_workqueue(local->workqueue);
222221

223222
rtnl_lock();
224223

225224
ieee802154_remove_interfaces(local);
226225

227226
rtnl_unlock();
228227

228+
destroy_workqueue(local->workqueue);
229229
wpan_phy_unregister(local->phy);
230230
}
231231
EXPORT_SYMBOL(ieee802154_unregister_hw);

0 commit comments

Comments
 (0)