]> Git Repo - linux.git/commitdiff
crypto: api - Fix boot-up crash when crypto manager is disabled
authorHerbert Xu <[email protected]>
Fri, 5 Nov 2021 07:26:08 +0000 (15:26 +0800)
committerHerbert Xu <[email protected]>
Tue, 9 Nov 2021 05:45:48 +0000 (13:45 +0800)
When the crypto manager is disabled, we need to explicitly set
the crypto algorithms' tested status so that they can be used.

Fixes: cad439fc040e ("crypto: api - Do not create test larvals if...")
Reported-by: Geert Uytterhoeven <[email protected]>
Reported-by: Ido Schimmel <[email protected]>
Reported-by: Guenter Roeck <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Tested-by: Ido Schimmel <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
crypto/algapi.c

index d379fd91fb7b031d76deac7133a16c801c58cf97..a366cb3e8aa1840760f86c5767a906f9a88f6387 100644 (file)
@@ -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);
 
This page took 0.057005 seconds and 4 git commands to generate.