Skip to contentSkip to conversation

crypto: api - Fix boot-up crash when crypto manager is disabled

DISCUSSION Guenter Roeck 1 participant 1 message Nov 5, 2021 Crypto API

lore
Share & tools
lore

Guenter Roeck

author Tested-by
#0 lore raw
Quoted 12 lines · Herbert Xu
Quoted 2 lines · Ido Schimmel

Attached my config. I can easily test patches.

Thanks!

Could you all try this patch please?

---8<---
When the crypto manager is disabled, we need to explicitly set the crypto algorithms' tested status so that they can be used.

Quoted 5 lines
Fixes cad439fc040e ("crypto: api - Do not create test larvals if...")
Quoted 18 lines
crypto/algapi.c +2 -0
index d379fd91fb7b..a366cb3e8aa1 100644
@@ -284,6 +284,8 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
 
 	if (larval)
 		list_add(&larval->alg.cra_list, &crypto_alg_list);
+	else
+		alg->cra_flags |= CRYPTO_ALG_TESTED;
 
 	crypto_stats_init(alg);
 
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