Search Linux Wireless

Re: [PATCH 9/9] ath9k: Fix memory leak due to failed PAPRD frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 29 March 2011 02:27 AM, Luis Rodriguez wrote:
From: Mohammed Shafi Shajakhan<mshajakhan@xxxxxxxxxxx>

commit 479600777bb588724d044815415f7d708d06644b upstream

free the skb's when the Tx of PAPRD frames fails and also add a debug
message indicating that.

Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@xxxxxxxxxxx>
Cc: stable@xxxxxxxxxx
Signed-off-by: John W. Linville<linville@xxxxxxxxxxxxx>
---
  drivers/net/wireless/ath/ath9k/main.c |    5 ++++-
  1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 1049313..16b8e36 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -384,8 +384,11 @@ void ath_paprd_calibrate(struct work_struct *work)
  		init_completion(&sc->paprd_complete);
  		ar9003_paprd_setup_gain_table(ah, chain);
  		txctl.paprd = BIT(chain);
-		if (ath_tx_start(hw, skb,&txctl) != 0)
+		if (ath_tx_start(hw, skb,&txctl) != 0) {
+			ath_print(common, ATH_DBG_XMIT, "PAPRD TX failed\n");
+			dev_kfree_skb_any(skb);
  			break;
+		}

  		time_left = wait_for_completion_timeout(&sc->paprd_complete,
  				msecs_to_jiffies(ATH_PAPRD_TIMEOUT));
Luis, thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux