All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: keep BHs disabled while calling drv_tx_wake_queue()
@ 2019-10-01 10:08 Johannes Berg
  2019-10-01 10:53 ` Toke Høiland-Jørgensen
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2019-10-01 10:08 UTC (permalink / raw)
  To: linux-wireless
  Cc: Toke Høiland-Jørgensen, Johannes Berg, Jiri Kosina,
	Aaron Hill, Lukas Redlinger, Oleksii Shevchuk

From: Johannes Berg <johannes.berg@intel.com>

Drivers typically expect this, as it's the case for almost all cases
where this is called (i.e. from the TX path). Also, the code in mac80211
itself (if the driver calls ieee80211_tx_dequeue()) expects this as it
uses this_cpu_ptr() without additional protection.

This should fix various reports of the problem:
https://bugzilla.kernel.org/show_bug.cgi?id=204127
https://lore.kernel.org/linux-wireless/CAN5HydrWb3o_FE6A1XDnP1E+xS66d5kiEuhHfiGKkLNQokx13Q@mail.gmail.com/
https://lore.kernel.org/lkml/nycvar.YFH.7.76.1909111238470.473@cbobk.fhfr.pm/

Reported-by: Jiri Kosina <jikos@kernel.org>
Reported-by: Aaron Hill <aa1ronham@gmail.com>
Reported-by: Lukas Redlinger <rel+kernel@agilox.net>
Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 051a02ddcb85..ad1e88958da2 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -273,9 +273,9 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)
 						&txqi->flags))
 				continue;
 
-			spin_unlock_bh(&fq->lock);
+			spin_unlock(&fq->lock);
 			drv_wake_tx_queue(local, txqi);
-			spin_lock_bh(&fq->lock);
+			spin_lock(&fq->lock);
 		}
 	}
 
-- 
2.20.1


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

end of thread, other threads:[~2019-10-01 11:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-01 10:08 [PATCH] mac80211: keep BHs disabled while calling drv_tx_wake_queue() Johannes Berg
2019-10-01 10:53 ` Toke Høiland-Jørgensen
2019-10-01 10:56   ` Johannes Berg
2019-10-01 11:12     ` Toke Høiland-Jørgensen
2019-10-01 10:56   ` Jiri Kosina
2019-10-01 11:01     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.