crypto: qat - initialize cra_flags before register into kpp
PATCH 1/1 crypto: qat - initialize cra_flags before register into kpp
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 <[email protected]>
Signed-off-by Giovanni Cabiddu <[email protected]>
--- drivers/crypto/qat/qat_common/qat_asym_algs.c | 1 + 1 file changed, 1 insertion(+)
drivers/crypto/qat/qat_common/qat_asym_algs.c +1 -0
@@ -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:
Signature · 1 line
2.9.3
Herbert Xu
maintainerQuoted 6 lines · Giovanni Cabiddu
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 <[email protected]>Signed-off-by Giovanni Cabiddu <[email protected]>
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,
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt