]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath10k: fix dma_free_coherent() pointer
authorThomas Fourier <fourier.thomas@gmail.com>
Mon, 5 Jan 2026 21:04:38 +0000 (22:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jan 2026 09:27:39 +0000 (10:27 +0100)
commit 9282a1e171ad8d2205067e8ec3bbe4e3cef4f29f 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: 2a1e1ad3fd37 ("ath10k: Add support for 64 bit ce descriptor")
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/20260105210439.20131-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/ath10k/ce.c

index afae4a8027f8338ad9fed64880fa16fed09f32e4..1bb006dd229bb9adefbe95d7ef4c838d6a1e3bcd 100644 (file)
@@ -1725,8 +1725,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
                                  (ce_state->src_ring->nentries *
                                   sizeof(struct ce_desc) +
                                   CE_DESC_RING_ALIGN),
-                                 ce_state->src_ring->base_addr_owner_space,
-                                 ce_state->src_ring->base_addr_ce_space);
+                                 ce_state->src_ring->base_addr_owner_space_unaligned,
+                                 ce_state->src_ring->base_addr_ce_space_unaligned);
                kfree(ce_state->src_ring);
        }
 
@@ -1735,8 +1735,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id)
                                  (ce_state->dest_ring->nentries *
                                   sizeof(struct ce_desc) +
                                   CE_DESC_RING_ALIGN),
-                                 ce_state->dest_ring->base_addr_owner_space,
-                                 ce_state->dest_ring->base_addr_ce_space);
+                                 ce_state->dest_ring->base_addr_owner_space_unaligned,
+                                 ce_state->dest_ring->base_addr_ce_space_unaligned);
                kfree(ce_state->dest_ring);
        }
 
@@ -1756,8 +1756,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
                                  (ce_state->src_ring->nentries *
                                   sizeof(struct ce_desc_64) +
                                   CE_DESC_RING_ALIGN),
-                                 ce_state->src_ring->base_addr_owner_space,
-                                 ce_state->src_ring->base_addr_ce_space);
+                                 ce_state->src_ring->base_addr_owner_space_unaligned,
+                                 ce_state->src_ring->base_addr_ce_space_unaligned);
                kfree(ce_state->src_ring);
        }
 
@@ -1766,8 +1766,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id)
                                  (ce_state->dest_ring->nentries *
                                   sizeof(struct ce_desc_64) +
                                   CE_DESC_RING_ALIGN),
-                                 ce_state->dest_ring->base_addr_owner_space,
-                                 ce_state->dest_ring->base_addr_ce_space);
+                                 ce_state->dest_ring->base_addr_owner_space_unaligned,
+                                 ce_state->dest_ring->base_addr_ce_space_unaligned);
                kfree(ce_state->dest_ring);
        }