diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-07-02 16:11:18 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2010-07-02 16:11:18 +0000 |
commit | 7c38977b3fd52e2d8d38b19c3a3ee86de770bdf7 (patch) | |
tree | b0aef90816b4e285b3ebef2095190157177420c3 | |
parent | 8a5671711be4c861c92410c452a9656a142d70b5 (diff) | |
download | mtk-20170518-7c38977b3fd52e2d8d38b19c3a3ee86de770bdf7.zip mtk-20170518-7c38977b3fd52e2d8d38b19c3a3ee86de770bdf7.tar.gz mtk-20170518-7c38977b3fd52e2d8d38b19c3a3ee86de770bdf7.tar.bz2 |
ath9k: fix a potential buffer leak
SVN-Revision: 22048
-rw-r--r-- | package/mac80211/patches/560-ath9k_buffer_leak.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/package/mac80211/patches/560-ath9k_buffer_leak.patch b/package/mac80211/patches/560-ath9k_buffer_leak.patch new file mode 100644 index 0000000..aa1f033 --- /dev/null +++ b/package/mac80211/patches/560-ath9k_buffer_leak.patch @@ -0,0 +1,68 @@ +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -2430,37 +2430,37 @@ void ath_tx_node_init(struct ath_softc * + + void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an) + { +- int i; +- struct ath_atx_ac *ac, *ac_tmp; +- struct ath_atx_tid *tid, *tid_tmp; ++ struct ath_atx_ac *ac; ++ struct ath_atx_tid *tid; + struct ath_txq *txq; ++ int i, tidno; + +- for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { +- if (ATH_TXQ_SETUP(sc, i)) { +- txq = &sc->tx.txq[i]; +- +- spin_lock_bh(&txq->axq_lock); +- +- list_for_each_entry_safe(ac, +- ac_tmp, &txq->axq_acq, list) { +- tid = list_first_entry(&ac->tid_q, +- struct ath_atx_tid, list); +- if (tid && tid->an != an) +- continue; +- list_del(&ac->list); +- ac->sched = false; +- +- list_for_each_entry_safe(tid, +- tid_tmp, &ac->tid_q, list) { +- list_del(&tid->list); +- tid->sched = false; +- ath_tid_drain(sc, txq, tid); +- tid->state &= ~AGGR_ADDBA_COMPLETE; +- tid->state &= ~AGGR_CLEANUP; +- } +- } ++ for (tidno = 0, tid = &an->tid[tidno]; ++ tidno < WME_NUM_TID; tidno++, tid++) { ++ i = tid->ac->qnum; + +- spin_unlock_bh(&txq->axq_lock); ++ if (!ATH_TXQ_SETUP(sc, i)) ++ continue; ++ ++ txq = &sc->tx.txq[i]; ++ ac = tid->ac; ++ ++ spin_lock_bh(&txq->axq_lock); ++ ++ if (tid->sched) { ++ list_del(&tid->list); ++ tid->sched = false; + } ++ ++ if (ac->sched) { ++ list_del(&ac->list); ++ tid->ac->sched = false; ++ } ++ ++ ath_tid_drain(sc, txq, tid); ++ tid->state &= ~AGGR_ADDBA_COMPLETE; ++ tid->state &= ~AGGR_CLEANUP; ++ ++ spin_unlock_bh(&txq->axq_lock); + } + } |