Skip to content

Commit a0f0dc9

Browse files
nifeyjmberg-intel
authored andcommitted
wifi: wl1251: fix memory leak in wl1251_tx_work
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: c5483b7 ("wl12xx: check if elp wakeup failed") Signed-off-by: Abdun Nihaal <[email protected]> Reviewed-by: Michael Nemanov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 9e935c0 commit a0f0dc9

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/wireless/ti/wl1251

1 file changed

+3
-1
lines changed

drivers/net/wireless/ti/wl1251/tx.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ void wl1251_tx_work(struct work_struct *work)
342342
while ((skb = skb_dequeue(&wl->tx_queue))) {
343343
if (!woken_up) {
344344
ret = wl1251_ps_elp_wakeup(wl);
345-
if (ret < 0)
345+
if (ret < 0) {
346+
skb_queue_head(&wl->tx_queue, skb);
346347
goto out;
348+
}
347349
woken_up = true;
348350
}
349351

0 commit comments

Comments
 (0)