Skip to content

Commit

Permalink
mac802154: Fixes kernel oops when unloading a radio driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Koen Zandberg authored and Marcel Holtmann committed Feb 23, 2016
1 parent 6367551 commit aef00c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac802154/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw)

tasklet_kill(&local->tasklet);
flush_workqueue(local->workqueue);
destroy_workqueue(local->workqueue);

rtnl_lock();

ieee802154_remove_interfaces(local);

rtnl_unlock();

destroy_workqueue(local->workqueue);
wpan_phy_unregister(local->phy);
}
EXPORT_SYMBOL(ieee802154_unregister_hw);
Expand Down

0 comments on commit aef00c1

Please sign in to comment.