summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-03-01 14:48:37 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-27 09:35:38 +0200
commit5efba8d96466b824aa9d205fe6eabcec2c6aa960 (patch)
tree334db1b003cf91b196d13f5ca4ff3503f34f2bb1 /net/mac80211
parent8a80544c5e6f50e7796380381f285488af47287f (diff)
downloadlinux-stable-5efba8d96466b824aa9d205fe6eabcec2c6aa960.tar.gz
linux-stable-5efba8d96466b824aa9d205fe6eabcec2c6aa960.tar.bz2
linux-stable-5efba8d96466b824aa9d205fe6eabcec2c6aa960.zip
mac80211: do not call driver wake_tx_queue op during reconfig
commit 4856bfd230985e43e84c26473c91028ff0a533bd upstream. There are several scenarios in which mac80211 can call drv_wake_tx_queue after ieee80211_restart_hw has been called and has not yet completed. Driver private structs are considered uninitialized until mac80211 has uploaded the vifs, stations and keys again, so using private tx queue data during that time is not safe. The driver can also not rely on drv_reconfig_complete to figure out when it is safe to accept drv_wake_tx_queue calls again, because it is only called after all tx queues are woken again. To fix this, bail out early in drv_wake_tx_queue if local->in_reconfig is set. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/driver-ops.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 4d82fe7d627c..284276b3e0b4 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1164,6 +1164,9 @@ static inline void drv_wake_tx_queue(struct ieee80211_local *local,
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif);
+ if (local->in_reconfig)
+ return;
+
if (!check_sdata_in_driver(sdata))
return;