Commit 9228207
wifi: ath12k: free skb during idr cleanup callback
ath12k just like ath11k [1] did not handle skb cleanup during idr
cleanup callback. Both ath12k_mac_vif_txmgmt_idr_remove() and
ath12k_mac_tx_mgmt_pending_free() performed idr cleanup and DMA
unmapping for skb but only ath12k_mac_tx_mgmt_pending_free() freed
skb. As a result, during vdev deletion a memory leak occurs.
Refactor all clean up steps into a new function. New function
ath12k_mac_tx_mgmt_free() creates a centralized area where idr
cleanup, DMA unmapping for skb and freeing skb is performed. Utilize
skb pointer given by idr_remove(), instead of passed as a function
argument because IDR will be protected by locking. This will prevent
concurrent modification of the same IDR.
Now ath12k_mac_tx_mgmt_pending_free() and
ath12k_mac_vif_txmgmt_idr_remove() call ath12k_mac_tx_mgmt_free().
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Link: https://lore.kernel.org/r/1637832614-13831-1-git-send-email-quic_srirrama@quicinc.com > # [1]
Fixes: d889913 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Karthik M <quic_karm@quicinc.com>
Signed-off-by: Muna Sinada <muna.sinada@oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20250923220316.1595758-1-muna.sinada@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>1 parent 0eb002c commit 9228207
1 file changed
Lines changed: 18 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8304 | 8304 | | |
8305 | 8305 | | |
8306 | 8306 | | |
8307 | | - | |
| 8307 | + | |
8308 | 8308 | | |
8309 | | - | |
| 8309 | + | |
8310 | 8310 | | |
8311 | | - | |
8312 | | - | |
8313 | 8311 | | |
8314 | 8312 | | |
8315 | | - | |
| 8313 | + | |
8316 | 8314 | | |
8317 | | - | |
| 8315 | + | |
| 8316 | + | |
| 8317 | + | |
| 8318 | + | |
| 8319 | + | |
8318 | 8320 | | |
8319 | 8321 | | |
8320 | 8322 | | |
8321 | 8323 | | |
8322 | 8324 | | |
8323 | | - | |
| 8325 | + | |
| 8326 | + | |
| 8327 | + | |
| 8328 | + | |
| 8329 | + | |
| 8330 | + | |
| 8331 | + | |
| 8332 | + | |
8324 | 8333 | | |
8325 | 8334 | | |
8326 | 8335 | | |
| |||
8329 | 8338 | | |
8330 | 8339 | | |
8331 | 8340 | | |
8332 | | - | |
8333 | 8341 | | |
8334 | | - | |
8335 | 8342 | | |
8336 | | - | |
8337 | | - | |
8338 | | - | |
8339 | | - | |
8340 | | - | |
8341 | | - | |
8342 | | - | |
| 8343 | + | |
| 8344 | + | |
8343 | 8345 | | |
8344 | 8346 | | |
8345 | 8347 | | |
| |||
0 commit comments