diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-27 23:16:41 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-27 23:16:41 -0400 |
commit | 6d7e3d89954af773c70948a54cfa2aaa15907c1c (patch) | |
tree | 6908f5e0e1af7294c00dc4e06ed583ef62f594df /crypto/algif_aead.c | |
parent | d725332208ef13241fc435eece790c9d0ea16a4e (diff) | |
parent | f858c7bcca8c20761a20593439fe998b4b67e86b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge the crypto tree for 4.1 to pull in the changeset that disables
algif_aead.
Diffstat (limited to 'crypto/algif_aead.c')
-rw-r--r-- | crypto/algif_aead.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 53702e9c6820..a55e4e6fa3d8 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c | |||
@@ -34,7 +34,7 @@ struct aead_ctx { | |||
34 | /* | 34 | /* |
35 | * RSGL_MAX_ENTRIES is an artificial limit where user space at maximum | 35 | * RSGL_MAX_ENTRIES is an artificial limit where user space at maximum |
36 | * can cause the kernel to allocate RSGL_MAX_ENTRIES * ALG_MAX_PAGES | 36 | * can cause the kernel to allocate RSGL_MAX_ENTRIES * ALG_MAX_PAGES |
37 | * bytes | 37 | * pages |
38 | */ | 38 | */ |
39 | #define RSGL_MAX_ENTRIES ALG_MAX_PAGES | 39 | #define RSGL_MAX_ENTRIES ALG_MAX_PAGES |
40 | struct af_alg_sgl rsgl[RSGL_MAX_ENTRIES]; | 40 | struct af_alg_sgl rsgl[RSGL_MAX_ENTRIES]; |
@@ -436,11 +436,10 @@ static int aead_recvmsg(struct socket *sock, struct msghdr *msg, size_t ignored, | |||
436 | if (err < 0) | 436 | if (err < 0) |
437 | goto unlock; | 437 | goto unlock; |
438 | usedpages += err; | 438 | usedpages += err; |
439 | /* chain the new scatterlist with initial list */ | 439 | /* chain the new scatterlist with previous one */ |
440 | if (cnt) | 440 | if (cnt) |
441 | scatterwalk_crypto_chain(ctx->rsgl[0].sg, | 441 | af_alg_link_sg(&ctx->rsgl[cnt-1], &ctx->rsgl[cnt]); |
442 | ctx->rsgl[cnt].sg, 1, | 442 | |
443 | sg_nents(ctx->rsgl[cnt-1].sg)); | ||
444 | /* we do not need more iovecs as we have sufficient memory */ | 443 | /* we do not need more iovecs as we have sufficient memory */ |
445 | if (outlen <= usedpages) | 444 | if (outlen <= usedpages) |
446 | break; | 445 | break; |