diff mbox series

wifi: ath12k: fix skb_ext_desc leak in ath12k_dp_tx error path

Message ID 20250122160112.3234558-1-nico.escande@gmail.com (mailing list archive)
State New
Delegated to: Kalle Valo
Headers show
Series wifi: ath12k: fix skb_ext_desc leak in ath12k_dp_tx error path | expand

Commit Message

Nicolas Escande Jan. 22, 2025, 4:01 p.m. UTC
When vlan support was added, we missed that when
ath12k_dp_prepare_htt_metadata returns an error we also need to free the
skb holding the metadata before going on with the cleanup process.
Compile tested only.

Fixes: 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")
Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
---
 drivers/net/wireless/ath/ath12k/dp_tx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Aditya Kumar Singh Jan. 22, 2025, 4:46 p.m. UTC | #1
On 1/22/25 21:31, Nicolas Escande wrote:
> When vlan support was added, we missed that when
> ath12k_dp_prepare_htt_metadata returns an error we also need to free the

nit: Always refer function name with () for clarity.

> skb holding the metadata before going on with the cleanup process.
> Compile tested only.
> 
> Fixes: 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")
> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
> ---

If there's going to be a new version please take care of above nit 
comment. Otherwise -

Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Jeff Johnson Jan. 22, 2025, 6:20 p.m. UTC | #2
On 1/22/2025 8:46 AM, Aditya Kumar Singh wrote:
> On 1/22/25 21:31, Nicolas Escande wrote:
>> When vlan support was added, we missed that when
>> ath12k_dp_prepare_htt_metadata returns an error we also need to free the
> 
> nit: Always refer function name with () for clarity.
> 
>> skb holding the metadata before going on with the cleanup process.
>> Compile tested only.
>>
>> Fixes: 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")
>> Signed-off-by: Nicolas Escande <nico.escande@gmail.com>
>> ---
> 
> If there's going to be a new version please take care of above nit 
> comment. Otherwise -
> 
> Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
> 
> 

I'll fixup () in both subject and description
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
index a8d341a6df01e..e0b85f959cd4a 100644
--- a/drivers/net/wireless/ath/ath12k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
@@ -398,6 +398,7 @@  int ath12k_dp_tx(struct ath12k *ar, struct ath12k_link_vif *arvif,
 			if (ret < 0) {
 				ath12k_dbg(ab, ATH12K_DBG_DP_TX,
 					   "Failed to add HTT meta data, dropping packet\n");
+				kfree_skb(skb_ext_desc);
 				goto fail_unmap_dma;
 			}
 		}