summaryrefslogtreecommitdiffstats
path: root/crypto/scatterwalk.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-05-27 14:37:27 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-05-28 11:23:17 +0800
commitfdaef75f66bba5999a94f3cd9156bf353ba2ef98 (patch)
treeb46bf1ba0ff0eb8fd586ebeb420c46da8b9b0cf3 /crypto/scatterwalk.c
parent693b549d39ea755abea721eb53b4262f75f41fb9 (diff)
downloadlinux-fdaef75f66bba5999a94f3cd9156bf353ba2ef98.tar.bz2
crypto: scatterwalk - Add missing sg_init_table to scatterwalk_ffwd
We need to call sg_init_table as otherwise the first entry may inadvertently become the last. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r--crypto/scatterwalk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 8690324d3aef..2ef9cbbc5dbf 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -158,6 +158,7 @@ struct scatterlist *scatterwalk_ffwd(struct scatterlist dst[2],
src = sg_next(src);
}
+ sg_init_table(dst, 2);
sg_set_page(dst, sg_page(src), src->length - len, src->offset + len);
scatterwalk_crypto_chain(dst, sg_next(src), 0, 2);