linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: crypto: algboss - Avoid spurious modprobe on LOADED
Date: Tue, 7 Apr 2020 15:17:44 +1000	[thread overview]
Message-ID: <20200407051744.GA13037@gondor.apana.org.au> (raw)
In-Reply-To: <20200407045835.GA102437@sol.localdomain>

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: <stable@vger.kernel.org> # 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 <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2020-04-07  5:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07  3:00 crypto: algboss - Avoid spurious modprobe on LOADED Herbert Xu
2020-04-07  4:58 ` Eric Biggers
2020-04-07  5:17   ` Herbert Xu [this message]
2020-04-07  6:02     ` [PATCH v2] crypto: algapi " Eric Biggers
2020-04-07 17:26       ` Martin K. Petersen
2020-04-16  6:52       ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200407051744.GA13037@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ebiggers@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).