summaryrefslogtreecommitdiff
path: root/drivers/crypto/rockchip/rk3288_crypto_ahash.c
diff options
context:
space:
mode:
authorZhang Zhijie <zhangzj@rock-chips.com>2019-02-13 11:24:38 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-22 07:47:26 +0300
commit4359669a087633132203c52d67dd8c31e09e7b2e (patch)
tree0c0f37cd69ca229dbbf5da9292d7d76b7549a579 /drivers/crypto/rockchip/rk3288_crypto_ahash.c
parentb5be853181a8d4a6e20f2073ccd273d6280cad88 (diff)
downloadlinux-4359669a087633132203c52d67dd8c31e09e7b2e.tar.xz
crypto: rockchip - fix scatterlist nents error
In some cases, the nents of src scatterlist is different from dst scatterlist. So two variables are used to handle the nents of src&dst scatterlist. Reported-by: Eric Biggers <ebiggers@google.com> Fixes: 433cd2c617bf ("crypto: rockchip - add crypto driver for rk3288") Cc: <stable@vger.kernel.org> # v4.5+ Signed-off-by: Zhang Zhijie <zhangzj@rock-chips.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/rockchip/rk3288_crypto_ahash.c')
-rw-r--r--drivers/crypto/rockchip/rk3288_crypto_ahash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c
index 821a506b9e17..c336ae75e361 100644
--- a/drivers/crypto/rockchip/rk3288_crypto_ahash.c
+++ b/drivers/crypto/rockchip/rk3288_crypto_ahash.c
@@ -206,7 +206,7 @@ static int rk_ahash_start(struct rk_crypto_info *dev)
dev->sg_dst = NULL;
dev->sg_src = req->src;
dev->first = req->src;
- dev->nents = sg_nents(req->src);
+ dev->src_nents = sg_nents(req->src);
rctx = ahash_request_ctx(req);
rctx->mode = 0;