ath11k: fix memory leak in monitor mode
PATCH 1/1 ath11k: fix memory leak in monitor mode
remove tail check to avoid last amsdu leak.
recycle skb in ppdu id wrap around case
Signed-off-by Miles Hu <[email protected]>
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +9 -2
@@ -3991,8 +3991,15 @@ ath11k_dp_rx_mon_mpdu_pop(struct ath11kif (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(struath11k_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
[email protected]
http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 5 lines · Miles Hu
remove tail check to avoid last amsdu leak.
recycle skb in ppdu id wrap around caseSigned-off-by Miles Hu <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath11k-post-bringup branch of ath.git, thanks.
a20bffb1b01d ath11k: fix memory leak in monitor mode
Signature · 9 lines
https://patchwork.kernel.org/patch/11237789/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k