Skip to content

Commit 23bc202

Browse files
Felix Fietkaulinvjw
authored andcommitted
ath9k: fix an RCU issue in calling ieee80211_get_tx_rates
ath_txq_schedule is called outside of the drv_tx call, so it needs RCU protection. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 2f2a884 commit 23bc202

File tree

1 file changed

+5
-1
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+5
-1
lines changed

drivers/net/wireless/ath/ath9k/xmit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,8 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
15701570
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
15711571
return;
15721572

1573+
rcu_read_lock();
1574+
15731575
ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
15741576
last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);
15751577

@@ -1608,8 +1610,10 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
16081610

16091611
if (ac == last_ac ||
16101612
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
1611-
return;
1613+
break;
16121614
}
1615+
1616+
rcu_read_unlock();
16131617
}
16141618

16151619
/***********/

0 commit comments

Comments
 (0)