[3.16.y-ckt stable] Patch "crypto: shash - Fix has_key setting" has been added to the 3.16.y-ckt tree
Luis Henriques
luis.henriques at canonical.com
Thu Feb 25 18:32:53 UTC 2016
This is a note to let you know that I have just added a patch titled
crypto: shash - Fix has_key setting
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt25.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
---8<------------------------------------------------------------
>From 7c684091e6330220b937f6ec1dcdd74b8fba41e9 Mon Sep 17 00:00:00 2001
From: Herbert Xu <herbert at gondor.apana.org.au>
Date: Wed, 27 Jan 2016 00:16:37 +0800
Subject: crypto: shash - Fix has_key setting
commit 00420a65fa2beb3206090ead86942484df2275f3 upstream.
The has_key logic is wrong for shash algorithms as they always
have a setkey function. So we should instead be testing against
shash_no_setkey.
Fixes: a5596d633278 ("crypto: hash - Add crypto_ahash_has_setkey")
Reported-by: Stephan Mueller <smueller at chronox.de>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Tested-by: Stephan Mueller <smueller at chronox.de>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
crypto/shash.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/crypto/shash.c b/crypto/shash.c
index aa3e505045e0..03fbcd4a82c4 100644
--- a/crypto/shash.c
+++ b/crypto/shash.c
@@ -354,11 +354,10 @@ int crypto_init_shash_ops_async(struct crypto_tfm *tfm)
crt->final = shash_async_final;
crt->finup = shash_async_finup;
crt->digest = shash_async_digest;
+ crt->setkey = shash_async_setkey;
+
+ crt->has_setkey = alg->setkey != shash_no_setkey;
- if (alg->setkey) {
- crt->setkey = shash_async_setkey;
- crt->has_setkey = true;
- }
if (alg->export)
crt->export = shash_async_export;
if (alg->import)
More information about the kernel-team
mailing list