Patch "crypto: algif_hash - wait for crypto_ahash_init() to complete" has been added to the 3.14-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
crypto: algif_hash - wait for crypto_ahash_init() to complete
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
crypto-algif_hash-wait-for-crypto_ahash_init-to-complete.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
fe09786178f9df713a4b2dd6b93c0a722346bf5eMon Sep 17 00:00:00 2001
From: "Wang, Rui Y" <[email protected]>
Date: Wed, 27 Jan 2016 17:08:37 +0800
Subject: crypto: algif_hash - wait for crypto_ahash_init() to complete
From: Wang, Rui Y <[email protected]>
commit fe09786178f9df713a4b2dd6b93c0a722346bf5e upstream.
hash_sendmsg/sendpage() need to wait for the completion of crypto_ahash_init() otherwise it can cause panic.
--- crypto/algif_hash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
crypto/algif_hash.c +3 -1
@@ -51,7 +51,8 @@ static int hash_sendmsg(struct kiocb *unlock_sock (sk);if (!ctx->more) { - err =crypto_ahash_init (&ctx->req); + err =af_alg_wait_for_completion (crypto_ahash_init (&ctx->req), + &ctx->completion);if (err) goto unlock; }
@@ -131,6 +132,7 @@ static ssize_t hash_sendpage(struct sock }else {if (!ctx->more) { err =crypto_ahash_init (&ctx->req); + err =af_alg_wait_for_completion (err, &ctx->completion);if (err) goto unlock; }
Patches currently in stable-queue which might be from [email protected] are
queue-3.14/crypto-algif_hash-wait-for-crypto_ahash_init-to-complete.patch