Skip to contentSkip to conversation

wifi: ath12k: fix skb_ext_desc leak in ath12k_dp_tx error path

PATCH Applied Nicolas Escande 3 participants 7 messages Jan 22, 2025 – Jan 23, 2025 Qualcomm ATH12K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: ath12k: fix skb_ext_desc leak in ath12k_dp_tx error path

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")
---
 drivers/net/wireless/ath/ath12k/dp_tx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath12k/dp_tx.c +1 -0
index a8d341a6df01e..e0b85f959cd4a 100644
@@ -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;
 			}
 		}
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Nicolas Escande

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.

Quoted 6 lines

skb holding the metadata before going on with the cleanup process. Compile tested only.

Fixes 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")

---

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

Signature · 1 line
Aditya
#2 lore raw
Quoted 9 lines · Aditya Kumar Singh
Quoted 2 lines · Nicolas Escande

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.

Quoted 3 lines

skb holding the metadata before going on with the cleanup process. Compile tested only.

Quoted 10 lines
Quoted 3 lines
Fixes 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")

---

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

I'll fixup () in both subject and description

#3 lore raw
Quoted 14 lines · Jeff Johnson
Quoted 13 lines · Aditya Kumar Singh
Quoted 2 lines · Nicolas Escande

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.

Quoted 6 lines

skb holding the metadata before going on with the cleanup process. Compile tested only.

Fixes 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")

---

Quoted 8 lines
Quoted 6 lines

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

I'll fixup () in both subject and description

fixup in pending:

https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=29d6569f323a88ccb3239abea562f6e691cfd9e4

#4 lore raw
Quoted 22 lines · Jeff Johnson
Quoted 21 lines · Jeff Johnson
Quoted 19 lines · Aditya Kumar Singh
Quoted 2 lines · Nicolas Escande

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.

Quoted 6 lines

skb holding the metadata before going on with the cleanup process. Compile tested only.

Fixes 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")

---

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

Quoted 5 lines
Quoted 1 line

I'll fixup () in both subject and description

fixup in pending:

https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=29d6569f323a88ccb3239abea562f6e691cfd9e4

Looks good.

Signature · 1 line
Aditya
#5 lore raw
In reply to Jeff Johnson
Quoted 22 lines · Jeff Johnson
Quoted 21 lines · Jeff Johnson
Quoted 19 lines · Aditya Kumar Singh
Quoted 2 lines · Nicolas Escande

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.

Quoted 6 lines

skb holding the metadata before going on with the cleanup process. Compile tested only.

Fixes 26dd8ccdba4d ("wifi: ath12k: dynamic VLAN support")

---

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

Quoted 5 lines
Quoted 1 line

I'll fixup () in both subject and description

fixup in pending:

https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=29d6569f323a88ccb3239abea562f6e691cfd9e4

Perfect,

Thanks a lot !

Applied
#6 lore raw
In reply to Nicolas Escande
Quoted 6 lines · Nicolas Escande

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.

Applied, thanks!

[1/1] wifi: ath12k: fix skb_ext_desc leak in ath12k_dp_tx error path

      commit: 28a9972e0f0693cd4d08f431c992fa6be39c788c

Best regards,

Signature · 1 line
Jeff Johnson <[email protected]>