Message ID | 20211105072608.GA13584@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: api - Fix boot-up crash when crypto manager is disabled | expand |
On Fri, Nov 05, 2021 at 03:26:08PM +0800, Herbert Xu wrote: > On Thu, Nov 04, 2021 at 05:18:34PM +0200, Ido Schimmel wrote: > > > > 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. > > Fixes: cad439fc040e ("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> Thanks, Herbert!
Hi Herbert, On Fri, Nov 5, 2021 at 8:26 AM Herbert Xu <herbert@gondor.apana.org.au> wrote: > 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. > > Fixes: cad439fc040e ("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> Thanks! Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
diff --git a/crypto/algapi.c b/crypto/algapi.c index d379fd91fb7b..a366cb3e8aa1 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);