diff options
author | Tomas Paukrt <tomaspaukrt@email.cz> | 2022-01-22 20:07:53 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2022-01-31 03:21:46 +0300 |
commit | 28e9b6d8199a3f124682b143800c2dacdc3d70dd (patch) | |
tree | 4c870d4d70b4b4394337918391dcaed5410e9d02 /drivers/crypto/mxs-dcp.c | |
parent | 05b3bade290d6c940701f97f3233c07cfe27205d (diff) | |
download | linux-28e9b6d8199a3f124682b143800c2dacdc3d70dd.tar.xz |
crypto: mxs-dcp - Fix scatterlist processing
This patch fixes a bug in scatterlist processing that may cause incorrect AES block encryption/decryption.
Fixes: 2e6d793e1bf0 ("crypto: mxs-dcp - Use sg_mapping_iter to copy data")
Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/mxs-dcp.c')
-rw-r--r-- | drivers/crypto/mxs-dcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c index d19e5ffb5104..d6f9e2fe863d 100644 --- a/drivers/crypto/mxs-dcp.c +++ b/drivers/crypto/mxs-dcp.c @@ -331,7 +331,7 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq) memset(key + AES_KEYSIZE_128, 0, AES_KEYSIZE_128); } - for_each_sg(req->src, src, sg_nents(src), i) { + for_each_sg(req->src, src, sg_nents(req->src), i) { src_buf = sg_virt(src); len = sg_dma_len(src); tlen += len; |