Skip to content

Commit 23aabe7

Browse files
committed
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
2 parents 23400ac + c8467f7 commit 23aabe7

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

crypto/algif_hash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
214214

215215
ahash_request_set_crypt(&ctx->req, NULL, ctx->result, 0);
216216

217-
if (!result) {
217+
if (!result && !ctx->more) {
218218
err = af_alg_wait_for_completion(
219219
crypto_ahash_init(&ctx->req),
220220
&ctx->completion);

crypto/scatterwalk.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg,
6868

6969
sg = scatterwalk_ffwd(tmp, sg, start);
7070

71-
if (sg_page(sg) == virt_to_page(buf) &&
72-
sg->offset == offset_in_page(buf))
73-
return;
74-
7571
scatterwalk_start(&walk, sg);
7672
scatterwalk_copychunks(buf, &walk, nbytes, out);
7773
scatterwalk_done(&walk, out, 0);

0 commit comments

Comments
 (0)