Commit 25c161a8 authored by Ovidiu Panait's avatar Ovidiu Panait Committed by Greg Kroah-Hartman
Browse files

crypto: sun8i-ce - fix nents passed to dma_unmap_sg()



[ Upstream commit b6cd3cfb ]

In sun8i_ce_cipher_unprepare(), dma_unmap_sg() is incorrectly called with
the number of entries returned by dma_map_sg(), rather than using the
original number of entries passed when mapping the scatterlist.

To fix this, stash the original number of entries passed to dma_map_sg()
in the request context.

Fixes: 0605fa0f ("crypto: sun8i-ce - split into prepare/run/unprepare")
Signed-off-by: default avatarOvidiu Panait <ovidiu.panait.oss@gmail.com>
Acked-by: default avatarCorentin LABBE <clabbe.montjoie@gmail.com>
Tested-by: default avatarCorentin LABBE <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0c93cd98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment