]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ath5k: fix tx path skb leaks
authorFelix Fietkau <nbd@openwrt.org>
Mon, 10 Dec 2012 15:40:41 +0000 (16:40 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 10 Dec 2012 20:49:58 +0000 (15:49 -0500)
ieee80211_free_txskb() needs to be used instead of dev_kfree_skb_any for
tx packets passed to the driver from mac80211

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/mac80211-ops.c

index 3a5a61e03922aef03766928e472c4c3d78054f0a..4ad40cfe9ce0f03ad9ad6a6473b8c7b661317016 100644 (file)
@@ -849,7 +849,7 @@ ath5k_txbuf_free_skb(struct ath5k_hw *ah, struct ath5k_buf *bf)
                return;
        dma_unmap_single(ah->dev, bf->skbaddr, bf->skb->len,
                        DMA_TO_DEVICE);
-       dev_kfree_skb_any(bf->skb);
+       ieee80211_free_txskb(ah->hw, bf->skb);
        bf->skb = NULL;
        bf->skbaddr = 0;
        bf->desc->ds_data = 0;
@@ -1576,7 +1576,7 @@ ath5k_tx_queue(struct ieee80211_hw *hw, struct sk_buff *skb,
        return;
 
 drop_packet:
-       dev_kfree_skb_any(skb);
+       ieee80211_free_txskb(hw, skb);
 }
 
 static void
index 1ea8c8795c8efeb1ed2e7b5ffacef643609a0885..4264341533eae5384af1a675db255496fa559245 100644 (file)
@@ -62,7 +62,7 @@ ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
        u16 qnum = skb_get_queue_mapping(skb);
 
        if (WARN_ON(qnum >= ah->ah_capabilities.cap_queues.q_tx_num)) {
-               dev_kfree_skb_any(skb);
+               ieee80211_free_txskb(hw, skb);
                return;
        }