* [PATCH] crypto: marvell: fix dma_free_coherent() size
@ 2025-12-18 10:12 Thomas Fourier
2026-01-16 6:04 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Fourier @ 2025-12-18 10:12 UTC (permalink / raw)
Cc: Thomas Fourier, Srujana Challa, Bharat Bhushan, Herbert Xu,
David S. Miller, Lukasz Bartosik, linux-crypto, linux-kernel
The size of the buffer in alloc_command_queues() is
curr->size + OTX_CPT_NEXT_CHUNK_PTR_SIZE, so used that length for
dma_free_coherent().
Fixes: 10b4f09491bf ("crypto: marvell - add the Virtual Function driver for CPT")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c
index 88a41d1ca5f6..6c0bfb3ea1c9 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptvf_main.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptvf_main.c
@@ -168,7 +168,8 @@ static void free_command_queues(struct otx_cptvf *cptvf,
chunk = list_first_entry(&cqinfo->queue[i].chead,
struct otx_cpt_cmd_chunk, nextchunk);
- dma_free_coherent(&pdev->dev, chunk->size,
+ dma_free_coherent(&pdev->dev,
+ chunk->size + OTX_CPT_NEXT_CHUNK_PTR_SIZE,
chunk->head,
chunk->dma_addr);
chunk->head = NULL;
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] crypto: marvell: fix dma_free_coherent() size
2025-12-18 10:12 [PATCH] crypto: marvell: fix dma_free_coherent() size Thomas Fourier
@ 2026-01-16 6:04 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2026-01-16 6:04 UTC (permalink / raw)
To: Thomas Fourier
Cc: Srujana Challa, Bharat Bhushan, David S. Miller, Lukasz Bartosik,
linux-crypto, linux-kernel
On Thu, Dec 18, 2025 at 11:12:57AM +0100, Thomas Fourier wrote:
> The size of the buffer in alloc_command_queues() is
> curr->size + OTX_CPT_NEXT_CHUNK_PTR_SIZE, so used that length for
> dma_free_coherent().
>
> Fixes: 10b4f09491bf ("crypto: marvell - add the Virtual Function driver for CPT")
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> ---
> drivers/crypto/marvell/octeontx/otx_cptvf_main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-16 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-18 10:12 [PATCH] crypto: marvell: fix dma_free_coherent() size Thomas Fourier
2026-01-16 6:04 ` Herbert Xu
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®