aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-23 01:54:27 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-07-23 01:54:27 +0000
commitff1aa411ffabee324ca362dd2f178babc0d9df84 (patch)
tree7de7b49b3e7040df830d3352ae2b9facb2a3b378
parenta4e3db863d166ca5c8f08a6e9a887abdb6a535eb (diff)
downloadupstream-ff1aa411ffabee324ca362dd2f178babc0d9df84.tar.gz
upstream-ff1aa411ffabee324ca362dd2f178babc0d9df84.tar.bz2
upstream-ff1aa411ffabee324ca362dd2f178babc0d9df84.zip
ath9k: fix another buffer leak in the aggregation code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22360 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/mac80211/patches/520-ath9k_leak_fix.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/mac80211/patches/520-ath9k_leak_fix.patch b/package/mac80211/patches/520-ath9k_leak_fix.patch
new file mode 100644
index 0000000000..acf7efd87f
--- /dev/null
+++ b/package/mac80211/patches/520-ath9k_leak_fix.patch
@@ -0,0 +1,32 @@
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -518,6 +518,14 @@ static void ath_tx_complete_aggr(struct
+ bf = bf_next;
+ }
+
++ /* prepend un-acked frames to the beginning of the pending frame queue */
++ if (!list_empty(&bf_pending)) {
++ spin_lock_bh(&txq->axq_lock);
++ list_splice(&bf_pending, &tid->buf_q);
++ ath_tx_queue_tid(txq, tid);
++ spin_unlock_bh(&txq->axq_lock);
++ }
++
+ if (tid->state & AGGR_CLEANUP) {
+ if (tid->baw_head == tid->baw_tail) {
+ tid->state &= ~AGGR_ADDBA_COMPLETE;
+@@ -530,14 +538,6 @@ static void ath_tx_complete_aggr(struct
+ return;
+ }
+
+- /* prepend un-acked frames to the beginning of the pending frame queue */
+- if (!list_empty(&bf_pending)) {
+- spin_lock_bh(&txq->axq_lock);
+- list_splice(&bf_pending, &tid->buf_q);
+- ath_tx_queue_tid(txq, tid);
+- spin_unlock_bh(&txq->axq_lock);
+- }
+-
+ rcu_read_unlock();
+
+ if (needreset)