diff options
author | Miles Hu <milehu@codeaurora.org> | 2019-11-28 09:21:49 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-11-29 08:49:55 +0100 |
commit | 5e02bc7354e1339ad801c7a2e31eb7f7bbeb7b22 (patch) | |
tree | 95e02b077fc4ae32b8a42e787023e97531727e2c /drivers/net/wireless | |
parent | ath11k: Advertise MPDU start spacing as no restriction (diff) | |
download | linux-5e02bc7354e1339ad801c7a2e31eb7f7bbeb7b22.tar.xz linux-5e02bc7354e1339ad801c7a2e31eb7f7bbeb7b22.zip |
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 <milehu@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/dp_rx.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 8c21925a522a..85e999c7a238 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -3735,8 +3735,15 @@ ath11k_dp_rx_mon_mpdu_pop(struct ath11k *ar, 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; } @@ -3938,7 +3945,7 @@ static int ath11k_dp_rx_mon_deliver(struct ath11k *ar, u32 mac_id, 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; |