Commit 28e9b6d8 authored by Tomas Paukrt's avatar Tomas Paukrt Committed by Herbert Xu

crypto: mxs-dcp - Fix scatterlist processing

This patch fixes a bug in scatterlist processing that may cause incorrect AES block encryption/decryption.

Fixes: 2e6d793e ("crypto: mxs-dcp - Use sg_mapping_iter to copy data")
Signed-off-by: default avatarTomas Paukrt <tomaspaukrt@email.cz>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 05b3bade
...@@ -331,7 +331,7 @@ static int mxs_dcp_aes_block_crypt(struct crypto_async_request *arq) ...@@ -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); 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); src_buf = sg_virt(src);
len = sg_dma_len(src); len = sg_dma_len(src);
tlen += len; tlen += len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment