summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2021-11-05 15:26:08 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2021-11-09 13:45:48 +0800
commit40fff69cb156110149db1d161c810720c2776f15 (patch)
tree62dcb689d213df391160d4961a8d06d2a0910bf1 /crypto/algapi.c
parent917c3353cc02542ab69be300d626c5b71e69090b (diff)
downloadlinux-crypto-40fff69cb156110149db1d161c810720c2776f15.tar.gz
linux-crypto-40fff69cb156110149db1d161c810720c2776f15.zip
crypto: api - Fix boot-up crash when crypto manager is disabled
When the crypto manager is disabled, we need to explicitly set the crypto algorithms' tested status so that they can be used. Fixes: 4e06ebe1bef0 ("crypto: api - Do not create test larvals if...") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reported-by: Ido Schimmel <idosch@idosch.org> Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Tested-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--crypto/algapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index d379fd91..a366cb3e 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -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);