diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-03-01 14:54:31 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-03-01 14:56:04 +0100 |
commit | c6caa7a27a38929f6d7e76795df6c3dbba7d7351 (patch) | |
tree | 5a6a44bbd0136775a2caccfaba4cdb40951ca12e /package | |
parent | 82d306b595b374277fd04c158d4cc7ddf5cf0b37 (diff) | |
download | upstream-c6caa7a27a38929f6d7e76795df6c3dbba7d7351.tar.gz upstream-c6caa7a27a38929f6d7e76795df6c3dbba7d7351.tar.bz2 upstream-c6caa7a27a38929f6d7e76795df6c3dbba7d7351.zip |
mac80211: add a fix to prevent unsafe queue wake calls during restart
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/301-mac80211-do-not-call-driver-wake_tx_queue-op-during-.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/301-mac80211-do-not-call-driver-wake_tx_queue-op-during-.patch b/package/kernel/mac80211/patches/subsys/301-mac80211-do-not-call-driver-wake_tx_queue-op-during-.patch new file mode 100644 index 0000000000..5bbf4db23b --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/301-mac80211-do-not-call-driver-wake_tx_queue-op-during-.patch @@ -0,0 +1,33 @@ +From: Felix Fietkau <nbd@nbd.name> +Date: Fri, 1 Mar 2019 14:42:56 +0100 +Subject: [PATCH] mac80211: do not call driver wake_tx_queue op during reconfig + +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> +--- + +--- a/net/mac80211/driver-ops.h ++++ b/net/mac80211/driver-ops.h +@@ -1166,6 +1166,9 @@ static inline void drv_wake_tx_queue(str + { + struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->txq.vif); + ++ if (local->in_reconfig) ++ return; ++ + if (!check_sdata_in_driver(sdata)) + return; + |