Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: do not call driver wake_tx_queue op during reconfig
@ 2019-03-01 13:48 Felix Fietkau
  2019-03-01 15:29 ` Ben Greear
  0 siblings, 1 reply; 5+ messages in thread
From: Felix Fietkau @ 2019-03-01 13:48 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, stable

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>
---
 net/mac80211/driver-ops.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 28d022a3eee3..ae4f0be3b393 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1195,6 +1195,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;
 
-- 
2.17.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-01 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01 13:48 [PATCH] mac80211: do not call driver wake_tx_queue op during reconfig Felix Fietkau
2019-03-01 15:29 ` Ben Greear
2019-03-01 16:06   ` Felix Fietkau
2019-03-01 16:13     ` Felix Fietkau
2019-03-01 17:21       ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox