* [PATCH] crypto: qat - initialize cra_flags before register into kpp
@ 2016-12-22 15:00 Giovanni Cabiddu
2016-12-28 10:12 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Cabiddu @ 2016-12-22 15:00 UTC (permalink / raw)
To: herbert; +Cc: linux-crypto, giovanni.cabiddu, Giovanni Cabiddu, Sushil Kumar
Initialize dh.base.cra_flags before registering the dh algorithm.
Without this fix, the registration of the dh algorithm might fail
if the qat driver is restarted.
Signed-off-by: Sushil Kumar <sushilx.kumar@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c b/drivers/crypto/qat/qat_common/qat_asym_algs.c
index 0d35dca..d3518e6 100644
--- a/drivers/crypto/qat/qat_common/qat_asym_algs.c
+++ b/drivers/crypto/qat/qat_common/qat_asym_algs.c
@@ -1343,6 +1343,7 @@ int qat_asym_algs_register(void)
ret = crypto_register_akcipher(&rsa);
if (ret)
goto unlock;
+ dh.base.cra_flags = 0;
ret = crypto_register_kpp(&dh);
}
unlock:
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: qat - initialize cra_flags before register into kpp
2016-12-22 15:00 [PATCH] crypto: qat - initialize cra_flags before register into kpp Giovanni Cabiddu
@ 2016-12-28 10:12 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2016-12-28 10:12 UTC (permalink / raw)
To: Giovanni Cabiddu; +Cc: linux-crypto, giovanni.cabiddu, Sushil Kumar
On Thu, Dec 22, 2016 at 03:00:51PM +0000, Giovanni Cabiddu wrote:
> Initialize dh.base.cra_flags before registering the dh algorithm.
> Without this fix, the registration of the dh algorithm might fail
> if the qat driver is restarted.
>
> Signed-off-by: Sushil Kumar <sushilx.kumar@intel.com>
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Please patch the crypto API instead. I think unsetting the bit
CRYPTO_ALG_DEAD at the top of crypto_register_alg should do the
trick.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-28 10:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-22 15:00 [PATCH] crypto: qat - initialize cra_flags before register into kpp Giovanni Cabiddu
2016-12-28 10:12 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).