aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2018-12-15 11:03:10 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-12-18 13:03:32 +0100
commita50e5fb8db83c5b57392204c21ea6c5c4ccefde6 (patch)
treecbffbae9790f918f7ac323268a6e1148488670a9 /net/mac80211/main.c
parentnet: dsa: mv88e6xxx: set ethtool regs version (diff)
downloadwireguard-linux-a50e5fb8db83c5b57392204c21ea6c5c4ccefde6.tar.xz
wireguard-linux-a50e5fb8db83c5b57392204c21ea6c5c4ccefde6.zip
mac80211: fix a kernel panic when TXing after TXQ teardown
Recently TXQ teardown was moved earlier in ieee80211_unregister_hw(), to avoid a use-after-free of the netdev data. However, interfaces aren't fully removed at the point, and cfg80211_shutdown_all_interfaces can for example, TX a deauth frame. Move the TXQ teardown to the point between cfg80211_shutdown_all_interfaces and the free of netdev queues, so we can be sure they are torn down before netdev is freed, but after there is no ongoing TX. Fixes: 77cfaf52eca5 ("mac80211: Run TXQ teardown code before de-registering interfaces") Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 83e71e6b2ebe..7b8320d4a8e4 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1262,7 +1262,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
rtnl_unlock();
ieee80211_led_exit(local);
ieee80211_wep_free(local);
- ieee80211_txq_teardown_flows(local);
fail_flows:
destroy_workqueue(local->workqueue);
fail_workqueue:
@@ -1288,7 +1287,6 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
#if IS_ENABLED(CONFIG_IPV6)
unregister_inet6addr_notifier(&local->ifa6_notifier);
#endif
- ieee80211_txq_teardown_flows(local);
rtnl_lock();