Message ID | 20161222150051.6284-1-giovanni.cabiddu@intel.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Herbert Xu |
Headers | show |
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,
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: