mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix memory leak in wl1251_tx_work
@ 2025-03-30  9:35 Abdun Nihaal
  2025-03-30 11:04 ` Markus Elfring
  0 siblings, 1 reply; 2+ messages in thread
From: Abdun Nihaal @ 2025-03-30  9:35 UTC (permalink / raw)
  To: abdun.nihaal
  Cc: luciano.coelho, vidhya.govindan, linville, kalle.valo,
	linux-wireless, linux-kernel

The skb dequeued from tx_queue is lost when wl1251_ps_elp_wakeup fails
with a -ETIMEDOUT error. Fix that by queueing the skb back to tx_queue.

Fixes: c5483b719363 ("wl12xx: check if elp wakeup failed")
Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
---
 drivers/net/wireless/ti/wl1251/tx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c
index 474b603c121c..adb4840b0489 100644
--- a/drivers/net/wireless/ti/wl1251/tx.c
+++ b/drivers/net/wireless/ti/wl1251/tx.c
@@ -342,8 +342,10 @@ void wl1251_tx_work(struct work_struct *work)
 	while ((skb = skb_dequeue(&wl->tx_queue))) {
 		if (!woken_up) {
 			ret = wl1251_ps_elp_wakeup(wl);
-			if (ret < 0)
+			if (ret < 0) {
+				skb_queue_head(&wl->tx_queue, skb);
 				goto out;
+			}
 			woken_up = true;
 		}
 
-- 
2.47.2


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

* Re: [PATCH] Fix memory leak in wl1251_tx_work
  2025-03-30  9:35 [PATCH] Fix memory leak in wl1251_tx_work Abdun Nihaal
@ 2025-03-30 11:04 ` Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2025-03-30 11:04 UTC (permalink / raw)
  To: Abdun Nihaal, linux-wireless
  Cc: LKML, Kalle Valo, Kalle Valo, John W. Linville, Luciano Coelho,
	Luciano Coelho, Vidhya Govindan, Vidhya Govindan

> The skb dequeued from tx_queue is lost when wl1251_ps_elp_wakeup fails
> with a -ETIMEDOUT error. Fix that by queueing the skb back to tx_queue.

* Please reconsider the distribution of email addresses over recipient lists
  once more.

* A corresponding subsystem specification can usually be helpful here.
  https://web.git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/net/wireless/ti/wl1251/tx.c?h=next-20250328

* Would you like to append parentheses to any function names?


Regards,
Markus

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

end of thread, other threads:[~2025-03-30 11:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-30  9:35 [PATCH] Fix memory leak in wl1251_tx_work Abdun Nihaal
2025-03-30 11:04 ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®