* [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer
@ 2026-01-05 21:04 Thomas Fourier
2026-01-06 2:55 ` Baochen Qiang
2026-01-09 15:45 ` Jeff Johnson
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Fourier @ 2026-01-05 21:04 UTC (permalink / raw)
Cc: Thomas Fourier, stable, Jeff Johnson, Kalle Valo, Govind Singh,
linux-wireless, ath10k, linux-kernel
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>
---
drivers/net/wireless/ath/ath10k/ce.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index 7bbda46cfd93..82f120ee1c66 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -1727,8 +1727,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);
}
@@ -1737,8 +1737,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);
}
@@ -1758,8 +1758,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);
}
@@ -1768,8 +1768,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);
}
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer
2026-01-05 21:04 [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer Thomas Fourier
@ 2026-01-06 2:55 ` Baochen Qiang
2026-01-09 15:45 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Baochen Qiang @ 2026-01-06 2:55 UTC (permalink / raw)
To: Thomas Fourier
Cc: stable, Jeff Johnson, Kalle Valo, Govind Singh, linux-wireless,
ath10k, linux-kernel
On 1/6/2026 5:04 AM, Thomas Fourier wrote:
> 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>
> ---
> drivers/net/wireless/ath/ath10k/ce.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
> index 7bbda46cfd93..82f120ee1c66 100644
> --- a/drivers/net/wireless/ath/ath10k/ce.c
> +++ b/drivers/net/wireless/ath/ath10k/ce.c
> @@ -1727,8 +1727,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);
> }
>
> @@ -1737,8 +1737,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);
> }
>
> @@ -1758,8 +1758,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);
> }
>
> @@ -1768,8 +1768,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);
> }
>
seems ath12k has the same issue, would you like to fix it as well?
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer
2026-01-05 21:04 [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer Thomas Fourier
2026-01-06 2:55 ` Baochen Qiang
@ 2026-01-09 15:45 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2026-01-09 15:45 UTC (permalink / raw)
To: Thomas Fourier
Cc: stable, Jeff Johnson, Kalle Valo, Govind Singh, linux-wireless,
ath10k, linux-kernel
On Mon, 05 Jan 2026 22:04:38 +0100, Thomas Fourier wrote:
> 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.
>
>
Applied, thanks!
[1/1] wifi: ath10k: fix dma_free_coherent() pointer
commit: 9282a1e171ad8d2205067e8ec3bbe4e3cef4f29f
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-09 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-05 21:04 [PATCH net] wifi: ath10k: fix dma_free_coherent() pointer Thomas Fourier
2026-01-06 2:55 ` Baochen Qiang
2026-01-09 15:45 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®