* [PATCH] ath11k: fix memory leak in monitor mode
@ 2019-11-11 21:15 Miles Hu
2019-11-22 10:39 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Miles Hu @ 2019-11-11 21:15 UTC (permalink / raw)
To: ath11k; +Cc: Miles Hu
remove tail check to avoid last amsdu leak.
recycle skb in ppdu id wrap around case
Signed-off-by: Miles Hu <milehu@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/dp_rx.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -3991,8 +3991,15 @@ ath11k_dp_rx_mon_mpdu_pop(struct ath11k
if (ath11k_dp_rx_mon_comp_ppduid(msdu_ppdu_id,
ppdu_id,
- &rx_bufs_used))
+ &rx_bufs_used)) {
+ if (rx_bufs_used) {
+ drop_mpdu = true;
+ dev_kfree_skb_any(msdu);
+ msdu = NULL;
+ goto next_msdu;
+ }
return rx_bufs_used;
+ }
pmon->mon_last_linkdesc_paddr = paddr;
is_first_msdu = false;
}
@@ -4194,7 +4201,7 @@ static int ath11k_dp_rx_mon_deliver(stru
ath11k_dp_rx_deliver_msdu(ar, napi, mon_skb);
mon_skb = skb_next;
- } while (mon_skb && (mon_skb != tail_msdu));
+ } while (mon_skb);
rxs->flag = 0;
return 0;
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix memory leak in monitor mode
2019-11-11 21:15 [PATCH] ath11k: fix memory leak in monitor mode Miles Hu
@ 2019-11-22 10:39 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-11-22 10:39 UTC (permalink / raw)
To: Miles Hu; +Cc: ath11k
Miles Hu <milehu@codeaurora.org> wrote:
> remove tail check to avoid last amsdu leak.
> recycle skb in ppdu id wrap around case
>
> Signed-off-by: Miles Hu <milehu@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath11k-post-bringup branch of ath.git, thanks.
a20bffb1b01d ath11k: fix memory leak in monitor mode
--
https://patchwork.kernel.org/patch/11237789/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-22 10:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 21:15 [PATCH] ath11k: fix memory leak in monitor mode Miles Hu
2019-11-22 10:39 ` Kalle Valo
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.