From: Herbert Xu Date: Wed, 27 May 2015 06:37:27 +0000 (+0800) Subject: crypto: scatterwalk - Add missing sg_init_table to scatterwalk_ffwd X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fdaef75f66bba5999a94f3cd9156bf353ba2ef98;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 --- 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);