summaryrefslogtreecommitdiff
path: root/drivers/crypto/talitos.c
diff options
context:
space:
mode:
authorLEROY Christophe <christophe.leroy@c-s.fr>2017-10-06 16:04:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-14 11:53:04 +0300
commit2040f8e814055a330aae1ed83c3fe2aba26173f0 (patch)
tree3faddb98b0ebf9d0ae247e3ef6d74d4fd8a3c67d /drivers/crypto/talitos.c
parenta2d93ada4fd30feeb3d0c914926f7a9fdea10102 (diff)
downloadlinux-2040f8e814055a330aae1ed83c3fe2aba26173f0.tar.xz
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 <christophe.leroy@c-s.fr> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto/talitos.c')
-rw-r--r--drivers/crypto/talitos.c4
1 files changed, 2 insertions, 2 deletions
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;