All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6.0-rc] wifi: rtw89: free unused skb to prevent memory leak
@ 2022-09-26  2:15 Ping-Ke Shih
  2022-09-26  5:26 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Ping-Ke Shih @ 2022-09-26  2:15 UTC (permalink / raw)
  To: kvalo; +Cc: Larry.Finger, stable, phhuang, linux-wireless

From: Po-Hao Huang <phhuang@realtek.com>

This avoid potential memory leak under power saving mode.

Fixes: fc5f311fce74 ("rtw89: don't flush hci queues and send h2c if power is off")
Cc: stable@vger.kernel.org
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220916033811.13862-6-pkshih@realtek.com
---
Hi Kalle,

We want this patch go to v6.0-rc, because it can fix memleak caused by another
patch. For users, this driver eats memory and could lead out-of-memory
finally.

This patch has been merged into wireless-next, but I forget to add "Fixes"
tag and Cc stable, so I add them to commit messages. If this works, I will
prepare another patch for v5.19.

Ping-Ke
---
 drivers/net/wireless/realtek/rtw89/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 16c74477b3325..e3086bf8f4513 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -847,6 +847,7 @@ int rtw89_h2c_tx(struct rtw89_dev *rtwdev,
 		rtw89_debug(rtwdev, RTW89_DBG_FW,
 			    "ignore h2c due to power is off with firmware state=%d\n",
 			    test_bit(RTW89_FLAG_FW_RDY, rtwdev->flags));
+		dev_kfree_skb(skb);
 		return 0;
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v6.0-rc] wifi: rtw89: free unused skb to prevent memory leak
  2022-09-26  2:15 [PATCH v6.0-rc] wifi: rtw89: free unused skb to prevent memory leak Ping-Ke Shih
@ 2022-09-26  5:26 ` Kalle Valo
  2022-09-26  5:45   ` Ping-Ke Shih
  0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2022-09-26  5:26 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: Larry.Finger, stable, phhuang, linux-wireless

Ping-Ke Shih <pkshih@realtek.com> writes:

> From: Po-Hao Huang <phhuang@realtek.com>
>
> This avoid potential memory leak under power saving mode.
>
> Fixes: fc5f311fce74 ("rtw89: don't flush hci queues and send h2c if power is off")
> Cc: stable@vger.kernel.org
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Kalle Valo <kvalo@kernel.org>
> Link: https://lore.kernel.org/r/20220916033811.13862-6-pkshih@realtek.com
> ---
> Hi Kalle,
>
> We want this patch go to v6.0-rc, because it can fix memleak caused by another
> patch. For users, this driver eats memory and could lead out-of-memory
> finally.
>
> This patch has been merged into wireless-next, but I forget to add "Fixes"
> tag and Cc stable, so I add them to commit messages. If this works, I will
> prepare another patch for v5.19.

-rc7 is already released, so we are quite late in the cycle, and I'm not
planning to submit another pull request for v6.0 unless something really
major happens. So I think it's better that you wait for the -next commit
to reach Linus' tree (should happen in next two weeks or so) and then
submit a patch to stable releases.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH v6.0-rc] wifi: rtw89: free unused skb to prevent memory leak
  2022-09-26  5:26 ` Kalle Valo
@ 2022-09-26  5:45   ` Ping-Ke Shih
  0 siblings, 0 replies; 3+ messages in thread
From: Ping-Ke Shih @ 2022-09-26  5:45 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Larry.Finger, stable, Bernie Huang, linux-wireless


> -----Original Message-----
> From: Kalle Valo <kvalo@kernel.org>
> Sent: Monday, September 26, 2022 1:27 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Larry.Finger@lwfinger.net; stable@vger.kernel.org; Bernie Huang <phhuang@realtek.com>;
> linux-wireless@vger.kernel.org
> Subject: Re: [PATCH v6.0-rc] wifi: rtw89: free unused skb to prevent memory leak
> 
> Ping-Ke Shih <pkshih@realtek.com> writes:
> 
> > From: Po-Hao Huang <phhuang@realtek.com>
> >
> > This avoid potential memory leak under power saving mode.
> >
> > Fixes: fc5f311fce74 ("rtw89: don't flush hci queues and send h2c if power is off")
> > Cc: stable@vger.kernel.org
> > Cc: Larry Finger <Larry.Finger@lwfinger.net>
> > Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> > Signed-off-by: Kalle Valo <kvalo@kernel.org>
> > Link: https://lore.kernel.org/r/20220916033811.13862-6-pkshih@realtek.com
> > ---
> > Hi Kalle,
> >
> > We want this patch go to v6.0-rc, because it can fix memleak caused by another
> > patch. For users, this driver eats memory and could lead out-of-memory
> > finally.
> >
> > This patch has been merged into wireless-next, but I forget to add "Fixes"
> > tag and Cc stable, so I add them to commit messages. If this works, I will
> > prepare another patch for v5.19.
> 
> -rc7 is already released, so we are quite late in the cycle, and I'm not
> planning to submit another pull request for v6.0 unless something really
> major happens. So I think it's better that you wait for the -next commit
> to reach Linus' tree (should happen in next two weeks or so) and then
> submit a patch to stable releases.
> 

Got it. I will do it weeks later. Thanks.

Ping-Ke


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-26  5:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26  2:15 [PATCH v6.0-rc] wifi: rtw89: free unused skb to prevent memory leak Ping-Ke Shih
2022-09-26  5:26 ` Kalle Valo
2022-09-26  5:45   ` Ping-Ke Shih

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.