[3.13.y-ckt stable] Patch "rtlwifi: fix memory leak for USB device" has been added to the 3.13.y-ckt tree

Kamal Mostafa kamal at canonical.com
Tue Feb 2 00:34:37 UTC 2016


This is a note to let you know that I have just added a patch titled

    rtlwifi: fix memory leak for USB device

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt34.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

>From 24f6a38487452ed692889cef6fb58fd3785f2e12 Mon Sep 17 00:00:00 2001
From: Peter Wu <peter at lekensteyn.nl>
Date: Mon, 7 Dec 2015 01:07:31 +0100
Subject: rtlwifi: fix memory leak for USB device

commit 17bc55864f81dd730d05f09b1641312a7990d636 upstream.

Free skb for received frames with a wrong checksum. This can happen
pretty rapidly, exhausting all memory.

This fixes a memleak (detected with kmemleak). Originally found while
using monitor mode, but it also appears during managed mode (once the
link is up).

Signed-off-by: Peter Wu <peter at lekensteyn.nl>
ACKed-by: Larry Finger <Larry.Finger at lwfinger.net>
Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/net/wireless/rtlwifi/usb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 6e55032..97584b0 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -535,6 +535,8 @@ static void _rtl_usb_rx_process_noagg(struct ieee80211_hw *hw,
 			ieee80211_rx(hw, skb);
 		else
 			dev_kfree_skb_any(skb);
+	} else {
+		dev_kfree_skb_any(skb);
 	}
 }

--
1.9.1





More information about the kernel-team mailing list