Skip to content

Commit ccb3894

Browse files
horiaggregkh
authored andcommitted
crypto: caam/jr - fix descriptor DMA unmapping
commit cc98963 upstream. Descriptor address needs to be swapped to CPU endianness before being DMA unmapped. Cc: <stable@vger.kernel.org> # 4.8+ Fixes: 261ea05 ("crypto: caam - handle core endianness != caam endianness") Reported-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent be6f98b commit ccb3894

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/crypto/caam

drivers/crypto/caam/jr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ static void caam_jr_dequeue(unsigned long devarg)
190190
BUG_ON(CIRC_CNT(head, tail + i, JOBR_DEPTH) <= 0);
191191

192192
/* Unmap just-run descriptor so we can post-process */
193-
dma_unmap_single(dev, jrp->outring[hw_idx].desc,
193+
dma_unmap_single(dev,
194+
caam_dma_to_cpu(jrp->outring[hw_idx].desc),
194195
jrp->entinfo[sw_idx].desc_size,
195196
DMA_TO_DEVICE);
196197

0 commit comments

Comments
 (0)