From a81fe1274b1cad14e30a108ae54ddbac39d0cade Mon Sep 17 00:00:00 2001 From: Oleksandr Mazur Date: Fri, 7 Nov 2025 13:15:27 +0000 Subject: [PATCH] ath11k: fix memory leak when peer lookup fails in dp rx path In the DP RX path, fast_rx is set to true by default. Currently, if peer lookup fails in ath11k_dp_rx_h_mpdu(), the SKB is not sent to the network stack or mac80211 because fast_rx remains true. This results in a memory leak. Fix this by setting fast_rx = false when peer lookup fails in ath11k_dp_rx_h_mpdu(), ensuring the SKB is properly delivered to mac80211 via ath11k_dp_rx_deliver_msdu(). Fixes: WIFI-15202 Signed-off-by: Marek Kwaczynski --- .../a-101-mac80211-clean-fast-rx.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 feeds/ipq807x_v5.4/mac80211/patches/pending/a-101-mac80211-clean-fast-rx.patch diff --git a/feeds/ipq807x_v5.4/mac80211/patches/pending/a-101-mac80211-clean-fast-rx.patch b/feeds/ipq807x_v5.4/mac80211/patches/pending/a-101-mac80211-clean-fast-rx.patch new file mode 100644 index 000000000..a6f5a3136 --- /dev/null +++ b/feeds/ipq807x_v5.4/mac80211/patches/pending/a-101-mac80211-clean-fast-rx.patch @@ -0,0 +1,22 @@ +Index: backports-20210222_001-5.4.164-b157d2276/drivers/net/wireless/ath/ath11k/dp_rx.c +=================================================================== +--- backports-20210222_001-5.4.164-b157d2276.orig/drivers/net/wireless/ath/ath11k/dp_rx.c ++++ backports-20210222_001-5.4.164-b157d2276/drivers/net/wireless/ath/ath11k/dp_rx.c +@@ -2847,8 +2847,6 @@ static void ath11k_dp_rx_h_mpdu(struct a + } + } + +- *fast_rx = false; +- + if (rxcb->is_mcbc) + enctype = peer->sec_type_grp; + else +@@ -2858,6 +2856,8 @@ static void ath11k_dp_rx_h_mpdu(struct a + } + spin_unlock_bh(&ar->ab->base_lock); + ++ *fast_rx = false; ++ + rx_attention = ath11k_dp_rx_get_attention(ar->ab, rx_desc); + err_bitmap = ath11k_dp_rx_h_attn_mpdu_err(rx_attention); + if (enctype != HAL_ENCRYPT_TYPE_OPEN && !err_bitmap)