diff options
author | Zhang Zhijie <zhangzj@rock-chips.com> | 2019-02-13 16:24:38 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-02-22 12:47:26 +0800 |
commit | 4359669a087633132203c52d67dd8c31e09e7b2e (patch) | |
tree | 0c0f37cd69ca229dbbf5da9292d7d76b7549a579 /drivers/crypto/rockchip/rk3288_crypto.c | |
parent | b5be853181a8d4a6e20f2073ccd273d6280cad88 (diff) |
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.c')
-rw-r--r-- | drivers/crypto/rockchip/rk3288_crypto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index c9d622abd90c..0ce4a65b95f5 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -119,7 +119,7 @@ static int rk_load_data(struct rk_crypto_info *dev, count = (dev->left_bytes > PAGE_SIZE) ? PAGE_SIZE : dev->left_bytes; - if (!sg_pcopy_to_buffer(dev->first, dev->nents, + if (!sg_pcopy_to_buffer(dev->first, dev->src_nents, dev->addr_vir, count, dev->total - dev->left_bytes)) { dev_err(dev->dev, "[%s:%d] pcopy err\n", |