Re: [PATCH] Correction to kmod.c control loop

From: borsa77
Date: Tue Dec 20 2005 - 19:29:34 EST


On 21 Dec 2005 at 0:23, Jesper Juhl wrote:

> On 12/21/05, Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:
> > > > > - if (i > MAX_KMOD_CONCURRENT)
> > > > > + if (i < MAX_KMOD_CONCURRENT)
> > > >
> > > > You changed MAX_KMOD_CONCURRENT from a constant to a variable above,
> > > > but you never assign a value to it, so here you are comparing i to an
> > > > uninitialized variable, not good.
> > >
> > >
> > > It is a _static_ local variable so it is assigned automatically to zero, I
> > > think.
> > >
> Hmm, yes, I wonder at that a bit as well, why static?

To maintain the value through a call of modprobe and a following one,
so if the first fails you can maybe have the loading with the others.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/