Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4022550ybb; Mon, 6 Apr 2020 22:18:00 -0700 (PDT) X-Google-Smtp-Source: APiQypItiG3o32x8rcqB071J7J1JLXQvNJ+sJ4aDrQ/Cayf3qSHpgWJPqfWyWHCnd/YYWdVftqF5 X-Received: by 2002:a9d:2aca:: with SMTP id e68mr211508otb.324.1586236680116; Mon, 06 Apr 2020 22:18:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586236680; cv=none; d=google.com; s=arc-20160816; b=pLSWcjmik+BQWzPlGX5nyw4OdmNbDjUhbbAZ3lb0Osm0jpLnvQsPq9Mrku9DMx8Ome Ex8SspK5vUlTcwVAf/Hpjs82lLO9NxHOTNyqnaBaNWMJoj3sJS5onWi45vPnTU0oPNDD 55kpes+YGalXKNoOrPpBKjZdmr+/unfusf+eWnU+Pu/JD6JpYg6IXzPFjF658E8HoMR/ pSudMgJMppy2MgqVLwH6HriqO+jtQvHDNpxDq8OFa7I7SyIC7EG+F1vo2xmRhTO9LIDj KltZCfIu+PQqh+KgHgn3j5ubChtcLNnymEh9P66bY/rYi7VdZ/nbtxzImqvyOHgDC564 iF3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=c5ejXvk1WgQN6aDWW7F8DtczdGXYnMHF4MFNMYhT34Y=; b=ZYFn99cxs+0pV4po2S7WpHFDGtxuig7Ssnwwa4gyuhUDboERg0lP8Ki1YgWAPL8cqa g5VURhcboxieZxHIuyP2fa4ZkYsPC4aEwmWj2hFHRtBheDflyLBDr/g+tK6+AisDyyha qlfVXrWVd+lqXbb6PoMw3GWZkY+3rRTjko7L8FTgS3naE7XnLj8EgC0rd9y/Rn9McYQv KF9RXMlzJ0xAb1eM/Wo9cTkaJXPFfQMCrbtbXeG8yHCjoArT9+O9SdLWnInW8g47UDAv WUZfmQKxAtzwC2WDUaNO7dMr9B8rB3Fbu8OEqe1gYkAZyXWZlg9r6RZ/Dfwkkqx6AZba fCcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si884173otc.162.2020.04.06.22.17.47; Mon, 06 Apr 2020 22:18:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbgDGFRr (ORCPT + 99 others); Tue, 7 Apr 2020 01:17:47 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:53450 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbgDGFRr (ORCPT ); Tue, 7 Apr 2020 01:17:47 -0400 Received: from gwarestrin.me.apana.org.au ([192.168.0.7] helo=gwarestrin.arnor.me.apana.org.au) by fornost.hmeau.com with smtp (Exim 4.89 #2 (Debian)) id 1jLgcK-0001xa-Kc; Tue, 07 Apr 2020 15:17:45 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Tue, 07 Apr 2020 15:17:44 +1000 Date: Tue, 7 Apr 2020 15:17:44 +1000 From: Herbert Xu To: Eric Biggers Cc: Linux Crypto Mailing List Subject: Re: crypto: algboss - Avoid spurious modprobe on LOADED Message-ID: <20200407051744.GA13037@gondor.apana.org.au> References: <20200407030003.GA12687@gondor.apana.org.au> <20200407045835.GA102437@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200407045835.GA102437@sol.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Mon, Apr 06, 2020 at 09:58:35PM -0700, Eric Biggers wrote: > > Needs a Fixes tag? > > Fixes: dd8b083f9a5e ("crypto: api - Introduce notifier for new crypto algorithms") > Cc: # v4.20+ Ah thanks, I had thought this was an ancient bug and therefore the fixes wouldn't have been that useful. The fact that it is a recent introduction means that we definitely should have the tags. > > diff --git a/crypto/algboss.c b/crypto/algboss.c > > index 527b44d0af21..01feb8234053 100644 > > --- a/crypto/algboss.c > > +++ b/crypto/algboss.c > > @@ -275,7 +275,7 @@ static int cryptomgr_notify(struct notifier_block *this, unsigned long msg, > > case CRYPTO_MSG_ALG_REGISTER: > > return cryptomgr_schedule_test(data); > > case CRYPTO_MSG_ALG_LOADED: > > - break; > > + return NOTIFY_OK; > > } > > > > return NOTIFY_DONE; > > It's hard to remember the difference between NOTIFY_OK and NOTIFY_DONE. Isn't > it wrong to call request_module() in the first place for a message that > "cryptomgr" doesn't care about? Wouldn't the following make more sense?: Good point. Yes we can and should do that here. Can you post a patch for this please? Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt