Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F4F3C433F5 for ; Fri, 5 Nov 2021 07:26:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4307761266 for ; Fri, 5 Nov 2021 07:26:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232226AbhKEH3a (ORCPT ); Fri, 5 Nov 2021 03:29:30 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:56568 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231341AbhKEH30 (ORCPT ); Fri, 5 Nov 2021 03:29:26 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1mitcB-0004IH-Kb; Fri, 05 Nov 2021 15:26:19 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1mitc0-0003Xg-Hv; Fri, 05 Nov 2021 15:26:08 +0800 Date: Fri, 5 Nov 2021 15:26:08 +0800 From: Herbert Xu To: Ido Schimmel Cc: Geert Uytterhoeven , Damien Le Moal , Nathan Chancellor , Linux Crypto Mailing List , Vladis Dronov , Simo Sorce , Eric Biggers , "llvm@lists.linux.dev" , kernel test robot , "linux-kernel@vger.kernel.org" , Guenter Roeck Subject: crypto: api - Fix boot-up crash when crypto manager is disabled Message-ID: <20211105072608.GA13584@gondor.apana.org.au> References: <20211003002801.GA5435@gondor.apana.org.au> <20211019132802.GA14233@gondor.apana.org.au> <20211104121612.GA8044@gondor.apana.org.au> <20211104133044.GA8563@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reported-by: Ido Schimmel Reported-by: Guenter Roeck Signed-off-by: Herbert Xu 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); -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt