Skip to content
/ linux Public

Commit 1eeb776

Browse files
Thomas-fourierSasha Levin
authored andcommitted
crypto: octeontx - fix dma_free_coherent() size
[ Upstream commit 624a676 ] 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: 10b4f09 ("crypto: marvell - add the Virtual Function driver for CPT") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0fbc22d commit 1eeb776

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/crypto/marvell/octeontx/otx_cptvf_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ static void free_command_queues(struct otx_cptvf *cptvf,
168168
chunk = list_first_entry(&cqinfo->queue[i].chead,
169169
struct otx_cpt_cmd_chunk, nextchunk);
170170

171-
dma_free_coherent(&pdev->dev, chunk->size,
171+
dma_free_coherent(&pdev->dev,
172+
chunk->size + OTX_CPT_NEXT_CHUNK_PTR_SIZE,
172173
chunk->head,
173174
chunk->dma_addr);
174175
chunk->head = NULL;

0 commit comments

Comments
 (0)