Message ID | 20170924203354.455841357@linuxfoundation.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
--- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -144,8 +144,10 @@ static int skcipher_alloc_sgl(struct soc 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); }