aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-11-23 04:11:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-23 04:11:50 -0500
commit23aabe73d53c29ee8da71397f87f190bdcde5b68 (patch)
tree05a0365d3a344cd5f66caa26d4734248beedd741
parent23400ac997062647f2b63c82030d189671b1effe (diff)
parentc8467f7a3620698bf3c22f0e199b550fb611a8ae (diff)
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: "The last push broke algif_hash for all shash implementations, so this is a follow-up to fix that. This also fixes a problem in the crypto scatterwalk that triggers a BUG_ON with certain debugging options due to the new vmalloced-stack code" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy crypto: algif_hash - Fix result clobbering in recvmsg
-rw-r--r--crypto/algif_hash.c2
-rw-r--r--crypto/scatterwalk.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 05e21b464433..d19b09cdf284 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -214,7 +214,7 @@ static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
214 214
215 ahash_request_set_crypt(&ctx->req, NULL, ctx->result, 0); 215 ahash_request_set_crypt(&ctx->req, NULL, ctx->result, 0);
216 216
217 if (!result) { 217 if (!result && !ctx->more) {
218 err = af_alg_wait_for_completion( 218 err = af_alg_wait_for_completion(
219 crypto_ahash_init(&ctx->req), 219 crypto_ahash_init(&ctx->req),
220 &ctx->completion); 220 &ctx->completion);
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index 52ce17a3dd63..c16c94f88733 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -68,10 +68,6 @@ void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg,
68 68
69 sg = scatterwalk_ffwd(tmp, sg, start); 69 sg = scatterwalk_ffwd(tmp, sg, start);
70 70
71 if (sg_page(sg) == virt_to_page(buf) &&
72 sg->offset == offset_in_page(buf))
73 return;
74
75 scatterwalk_start(&walk, sg); 71 scatterwalk_start(&walk, sg);
76 scatterwalk_copychunks(buf, &walk, nbytes, out); 72 scatterwalk_copychunks(buf, &walk, nbytes, out);
77 scatterwalk_done(&walk, out, 0); 73 scatterwalk_done(&walk, out, 0);