crypto: cavium: fix dma_free_coherent() size
Subsystems (2)
PATCH 1/1 crypto: cavium: fix dma_free_coherent() size
The size of the buffer in alloc_command_queues() is curr->size + CPT_NEXT_CHUNK_PTR_SIZE, so used that length for dma_free_coherent().
Fixes c694b233295b ("crypto: cavium - Add the Virtual Function driver for CPT")
Signed-off-by Thomas Fourier <[email protected]>
--- drivers/crypto/cavium/cpt/cptvf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/crypto/cavium/cpt/cptvf_main.c +2 -1
@@ -180,7 +180,8 @@ static void free_command_queues(struct cpt_vf *cptvf,hlist_for_each_entry_safe (chunk, node, &cqinfo->queue[i].chead, nextchunk) { -dma_free_coherent (&pdev->dev, chunk->size, +dma_free_coherent (&pdev->dev, + chunk->size +CPT_NEXT_CHUNK_PTR_SIZE , chunk->head, chunk->dma_addr); chunk->head =NULL ;
Signature · 1 line
2.43.0
Herbert Xu
maintainerQuoted 9 lines · Thomas Fourier
The size of the buffer in
alloc_command_queues()iscurr->size+CPT_NEXT_CHUNK_PTR_SIZE, so used that length fordma_free_coherent().Fixes c694b233295b ("crypto: cavium - Add the Virtual Function driver for CPT")Signed-off-by Thomas Fourier <[email protected]>--- drivers/crypto/cavium/cpt/cptvf_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt