* [PATCH 4.20] rtlwifi: Fix leak of skb when processing C2H_BT_INFO
@ 2018-11-18 2:55 Larry Finger
2018-12-13 13:38 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Larry Finger @ 2018-11-18 2:55 UTC (permalink / raw)
To: kvalo
Cc: linux-wireless, Larry Finger,
Francisco Machado Magalhães Neto, Ping-Ke Shih, Stable
With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
the routine returns without freeing that skb, thereby leaking it.
This issue has been discussed at https://github.com/lwfinger/rtlwifi_new/issues/401
and the fix tested there.
Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing C2H_BT_INFO")
Reported-and-tested-by: Francisco Machado Magalhães Neto <franmagneto@gmail.com>
Cc: Francisco Machado Magalhães Neto <franmagneto@gmail.com>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: Stable <stable@vger.kernel.org> # 4.18+
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
drivers/net/wireless/realtek/rtlwifi/base.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index f4122c8fdd97..ef9b502ce576 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -2289,6 +2289,7 @@ void rtl_c2hcmd_enqueue(struct ieee80211_hw *hw, struct sk_buff *skb)
if (rtl_c2h_fast_cmd(hw, skb)) {
rtl_c2h_content_parsing(hw, skb);
+ kfree_skb(skb);
return;
}
--
2.16.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4.20] rtlwifi: Fix leak of skb when processing C2H_BT_INFO
2018-11-18 2:55 [PATCH 4.20] rtlwifi: Fix leak of skb when processing C2H_BT_INFO Larry Finger
@ 2018-12-13 13:38 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-12-13 13:38 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless, Larry Finger,
Francisco Machado Magalhães Neto, Ping-Ke Shih, Stable
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> With commit 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing
> C2H_BT_INFO"), calling rtl_c2hcmd_enqueue() with rtl_c2h_fast_cmd() true,
> the routine returns without freeing that skb, thereby leaking it.
>
> This issue has been discussed at https://github.com/lwfinger/rtlwifi_new/issues/401
> and the fix tested there.
>
> Fixes: 0a9f8f0a1ba9 ("rtlwifi: fix btmpinfo timeout while processing C2H_BT_INFO")
> Reported-and-tested-by: Francisco Machado Magalhães Neto <franmagneto@gmail.com>
> Cc: Francisco Machado Magalhães Neto <franmagneto@gmail.com>
> Cc: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Stable <stable@vger.kernel.org> # 4.18+
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Patch applied to wireless-drivers.git, thanks.
8cfa272b0d32 rtlwifi: Fix leak of skb when processing C2H_BT_INFO
--
https://patchwork.kernel.org/patch/10687671/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-13 13:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-18 2:55 [PATCH 4.20] rtlwifi: Fix leak of skb when processing C2H_BT_INFO Larry Finger
2018-12-13 13:38 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).