From: LEROY Christophe Date: Fri, 6 Oct 2017 13:04:41 +0000 (+0200) Subject: crypto: talitos - fix use of sg_link_tbl_len X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2040f8e814055a330aae1ed83c3fe2aba26173f0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: talitos - fix use of sg_link_tbl_len commit fbb22137c4d9bab536958b152d096fb3f98020ea upstream. sg_link_tbl_len shall be used instead of cryptlen, otherwise SECs which perform HW CICV verification will fail. Signed-off-by: Christophe Leroy Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index b7184f305867..cf5c9701b898 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -1232,8 +1232,8 @@ static int ipsec_esp(struct talitos_edesc *edesc, struct aead_request *areq, sg_link_tbl_len += authsize; } - ret = talitos_sg_map(dev, areq->src, cryptlen, edesc, &desc->ptr[4], - sg_count, areq->assoclen, tbl_off); + ret = talitos_sg_map(dev, areq->src, sg_link_tbl_len, edesc, + &desc->ptr[4], sg_count, areq->assoclen, tbl_off); if (ret > 1) { tbl_off += ret;