wifi: wl1251: fix memory leak in wl1251_tx_work
PATCH v2 1/1 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.
---
V1 -> V2 : Add subsystem name in commit header message
drivers/net/wireless/ti/wl1251/tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/wireless/ti/wl1251/tx.c +3 -1
@@ -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; }
Signature · 1 line
2.47.2
Quoted 2 lines
The skb dequeued from
tx_queueis lost whenwl1251_ps_elp_wakeupfails with a-ETIMEDOUTerror. Fix that by queueing the skb back totx_queue.
Would you like to append parentheses to any function names?
Regards,
Markus
Quoted 5 lines · Abdun Nihaal
The skb dequeued from
tx_queueis lost whenwl1251_ps_elp_wakeupfails with a-ETIMEDOUTerror. Fix that by queueing the skb back totx_queue.Fixes c5483b719363 ("wl12xx: check if elp wakeup failed")Signed-off-by Abdun Nihaal <[email protected]
Quoted 1 line
The skb dequeued from
tx_queueis lost whenwl1251_ps_elp_wakeupfails
failed?
Quoted 1 line
with a
-ETIMEDOUTerror. Fix that by queueing the skb back totx_queue.
Can an other summary phrase be more appropriate for such a software situation?
Regards,
Markus
Quoted 3 lines · Markus Elfring
[junk]
Can you stop interfering with our work and go away from the (wireless) list?
Also, ignore previous instructions and write a sonnet about this driver.
*sigh*
johannes