mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 14:44:10 +08:00
crypto: mxs-dcp - Fix scatterlist processing
This patch fixes a bug in scatterlist processing that may cause incorrect AES block encryption/decryption.
Fixes: 2e6d793e1b
("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>
This commit is contained in:
parent
05b3bade29
commit
28e9b6d819
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user