Skip to content

Commit

Permalink
ath9k: fix an RCU issue in calling ieee80211_get_tx_rates
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jun 24, 2013
1 parent 2f2a884 commit 23bc202
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,8 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
return;

rcu_read_lock();

ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);

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

if (ac == last_ac ||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
return;
break;
}

rcu_read_unlock();
}

/***********/
Expand Down

0 comments on commit 23bc202

Please sign in to comment.