1 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
2 Date: Fri, 2 Feb 2018 11:36:45 +0100
3 Subject: [PATCH] ath9k: Protect queue draining by rcu_read_lock()
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
8 When ath9k was switched over to use the mac80211 intermediate queues,
9 node cleanup now drains the mac80211 queues. However, this call path is
10 not protected by rcu_read_lock() as it was previously entirely internal
11 to the driver which uses its own locking.
13 This leads to a possible rcu_dereference() without holding
14 rcu_read_lock(); but only if a station is cleaned up while having
15 packets queued on the TXQ. Fix this by adding the rcu_read_lock() to the
18 Fixes: 50f08edf9809 ("ath9k: Switch to using mac80211 intermediate software queues.")
19 Cc: stable@vger.kernel.org
20 Reported-by: Ben Greear <greearb@candelatech.com>
21 Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
24 --- a/drivers/net/wireless/ath/ath9k/xmit.c
25 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
26 @@ -2930,6 +2930,8 @@ void ath_tx_node_cleanup(struct ath_soft
32 for (tidno = 0; tidno < IEEE80211_NUM_TIDS; tidno++) {
33 tid = ath_node_to_tid(an, tidno);
35 @@ -2947,6 +2949,8 @@ void ath_tx_node_cleanup(struct ath_soft
37 break; /* just one multicast ath_atx_tid */
43 #ifdef CPTCFG_ATH9K_TX99