]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath12k: fix dma_free_coherent() pointer
authorThomas Fourier <fourier.thomas@gmail.com>
Tue, 6 Jan 2026 08:49:04 +0000 (09:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:39 +0000 (10:27 +0100)
commit bb97131fbf9b708dd9616ac2bdc793ad102b5c48 upstream.

dma_alloc_coherent() allocates a DMA mapped buffer and stores the
addresses in XXX_unaligned fields.  Those should be reused when freeing
the buffer rather than the aligned addresses.

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260106084905.18622-2-fourier.thomas@gmail.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath12k/ce.c

index b66d23d6b2bd9e36d1972a6fbf4dea2cabaf58d7..a25943a1bff85936d98fcdc26ce701796338e2b1 100644 (file)
@@ -893,8 +893,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
                        dma_free_coherent(ab->dev,
                                          pipe->src_ring->nentries * desc_sz +
                                          CE_DESC_RING_ALIGN,
-                                         pipe->src_ring->base_addr_owner_space,
-                                         pipe->src_ring->base_addr_ce_space);
+                                         pipe->src_ring->base_addr_owner_space_unaligned,
+                                         pipe->src_ring->base_addr_ce_space_unaligned);
                        kfree(pipe->src_ring);
                        pipe->src_ring = NULL;
                }
@@ -904,8 +904,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
                        dma_free_coherent(ab->dev,
                                          pipe->dest_ring->nentries * desc_sz +
                                          CE_DESC_RING_ALIGN,
-                                         pipe->dest_ring->base_addr_owner_space,
-                                         pipe->dest_ring->base_addr_ce_space);
+                                         pipe->dest_ring->base_addr_owner_space_unaligned,
+                                         pipe->dest_ring->base_addr_ce_space_unaligned);
                        kfree(pipe->dest_ring);
                        pipe->dest_ring = NULL;
                }
@@ -916,8 +916,8 @@ void ath12k_ce_free_pipes(struct ath12k_base *ab)
                        dma_free_coherent(ab->dev,
                                          pipe->status_ring->nentries * desc_sz +
                                          CE_DESC_RING_ALIGN,
-                                         pipe->status_ring->base_addr_owner_space,
-                                         pipe->status_ring->base_addr_ce_space);
+                                         pipe->status_ring->base_addr_owner_space_unaligned,
+                                         pipe->status_ring->base_addr_ce_space_unaligned);
                        kfree(pipe->status_ring);
                        pipe->status_ring = NULL;
                }