Re: crypto: algboss - Avoid spurious modprobe on LOADED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux