Re: kmod: provide wrappers for kmod_concurrent inc/dec

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

 



On Wed, Dec 21, 2016 at 09:07:21PM -0800, Jessica Yu wrote:
> +++ Luis R. Rodriguez [08/12/16 11:48 -0800]:
> > diff --git a/kernel/kmod.c b/kernel/kmod.c
> > index cb6f7ca7b8a5..049d7eabda38 100644
> > --- a/kernel/kmod.c
> > +++ b/kernel/kmod.c
> > @@ -108,6 +111,20 @@ static int call_modprobe(char *module_name, int wait)
> > 	return -ENOMEM;
> > }
> > 
> > +static int kmod_umh_threads_get(void)
> > +{
> > +	atomic_inc(&kmod_concurrent);
> > +	if (atomic_read(&kmod_concurrent) < max_modprobes)
> 
> Should this not be <=? I think this only allows up to max_modprobes-1 concurrent threads.

True, fixed!

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux