summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-10-04 12:03:25 +0800
committerAlex Shi <alex.shi@linaro.org>2017-10-04 12:03:25 +0800
commita759573d34fc8249c416857e15cf8d0fd9c99d1a (patch)
treecb2d530d42301f84382686fd343f71223e9af157 /crypto
parenteebd4781fb3bb7b47568d8747d97d269d2649ec9 (diff)
parentcda2b9481445e798669f00fb8275d595f1ff943f (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'crypto')
-rw-r--r--crypto/algif_skcipher.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index b3b0004ea8ac..d12782dc9683 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -143,8 +143,10 @@ static int skcipher_alloc_sgl(struct sock *sk)
sg_init_table(sgl->sg, MAX_SGL_ENTS + 1);
sgl->cur = 0;
- if (sg)
+ if (sg) {
sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg);
+ sg_unmark_end(sg + (MAX_SGL_ENTS - 1));
+ }
list_add_tail(&sgl->list, &ctx->tsgl);
}