Patch "rtlwifi: rtl8192ee: Fix memory leak when loading firmware" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
rtlwifi: rtl8192ee: Fix memory leak when loading firmware
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
rtlwifi-rtl8192ee-fix-memory-leak-when-loading-firmware.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
519ce2f933fa14acf69d5c8cabcc18711943d629Mon Sep 17 00:00:00 2001
From: Larry Finger <[email protected]>
Date: Thu, 14 Sep 2017 13:17:44 -0500
Subject: rtlwifi: rtl8192ee: Fix memory leak when loading firmware
From: Larry Finger <[email protected]>
commit 519ce2f933fa14acf69d5c8cabcc18711943d629 upstream.
In routine rtl92ee_set_fw_rsvdpagepkt(), the driver allocates an skb, but never calls rtl_cmd_send_packet(), which will free the buffer. All other rtlwifi drivers perform this operation correctly.
This problem has been in the driver since it was included in the kernel. Fortunately, each firmware load only leaks 4 buffers, which likely explains why it has not previously been detected.
--- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c +4 -2
@@ -664,7 +664,7 @@ void rtl92ee_set_fw_rsvdpagepkt(struct istruct rtl_priv *rtlpriv =rtl_priv (hw);struct rtl_mac *mac =rtl_mac (rtl_priv (hw));struct sk_buff *skb =NULL ; - +bool rtstatus;u32 totalpacketlen;u8 u1rsvdpageloc[5 ] = {0 };bool b_dlok = false;
@@ -727,7 +727,9 @@ void rtl92ee_set_fw_rsvdpagepkt(struct imemcpy ((u8 *)skb_put (skb, totalpacketlen), &reserved_page_packet, totalpacketlen); - b_dlok = true; + rtstatus =rtl_cmd_send_packet (hw, skb); +if (rtstatus) + b_dlok = true;if (b_dlok) { RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD ,
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/rtlwifi-fix-uninitialized-rtlhal-last_suspend_sec-time.patch queue-4.9/rtlwifi-rtl8192ee-fix-memory-leak-when-loading-firmware.patch