Re: Linux-2.2.20pre10

Robert Love (rml@tech9.net)
13 Sep 2001 12:46:39 -0400


On Thu, 2001-09-13 at 02:59, Willy TARREAU wrote:
> Robert M. Love pointed out that the command line parse could forget arguments
> if either MAX_INIT_ENVS or MAX_INIT_ARGS were reached, and his patch seems to
> fix it correctly :

I have posted posted this patch multiple times for 2.2 and 2.4, to no
avail -- in fact, it seems no one even thinks this is a bug.

to me, it is pretty clear that hitting MAX_INIT_ENVS _or_ MAX_INIT_ARGS
kills the parse_options loop, when that should not occur until both are
hit -- thus, this patch switches the breaks to continues.

thanks for noticing, I hope it is applied.

> --- linux-2.2.19-wt5-OE/init/main.c Sat Sep 8 23:11:00 2001
> +++ linux-2.2.19-wt5-OF/init/main.c Sat Sep 8 23:24:13 2001
> @@ -1292,11 +1292,11 @@
> */
> if (strchr(line,'=')) {
> if (envs >= MAX_INIT_ENVS)
> - break;
> + continue;
> envp_init[++envs] = line;
> } else {
> if (args >= MAX_INIT_ARGS)
> - break;
> + continue;
> argv_init[++args] = line;
> }
> }

-- 
Robert M. Love
rml at ufl.edu
rml at tech9.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/