Skip to content

Commit 40aa3c2

Browse files
jtornosmgregkh
authored andcommitted
wifi: ath11k: fix warning when unbinding
commit 8b7a26b upstream. If there is an error during some initialization related to firmware, the buffers dp->tx_ring[i].tx_status are released. However this is released again when the device is unbinded (ath11k_pci), and we get: WARNING: CPU: 0 PID: 6231 at mm/slub.c:4368 free_large_kmalloc+0x57/0x90 Call Trace: free_large_kmalloc ath11k_dp_free ath11k_core_deinit ath11k_pci_remove ... The issue is always reproducible from a VM because the MSI addressing initialization is failing. In order to fix the issue, just set the buffers to NULL after releasing in order to avoid the double free. Fixes: d5c6515 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Cc: stable@vger.kernel.org Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260420110130.509670-1-jtornosm@redhat.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a7cdc38 commit 40aa3c2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • drivers/net/wireless/ath/ath11k

drivers/net/wireless/ath/ath11k/dp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,7 @@ void ath11k_dp_free(struct ath11k_base *ab)
10421042
idr_destroy(&dp->tx_ring[i].txbuf_idr);
10431043
spin_unlock_bh(&dp->tx_ring[i].tx_idr_lock);
10441044
kfree(dp->tx_ring[i].tx_status);
1045+
dp->tx_ring[i].tx_status = NULL;
10451046
}
10461047

10471048
/* Deinit any SOC level resource */

0 commit comments

Comments
 (0)