Re: 2.6.5-rc2-mm1 does not boot. 2.6.5-rc1-mm2 + small fix from axboe was fine

Eric Valette
2004-03-21T21:22:41Z

Zwane Mwaikambo wrote:

> How about the following patch?

Part of this does not apply...

> --- linux-2.6.5-rc2-mm1/init/main.c 21 Mar 2004 17:02:18 -0000
> 1.1.1.1
> +++ linux-2.6.5-rc2-mm1/init/main.c 21 Mar 2004 20:54:19 -0000
> @@ -586,8 +586,8 @@ static int free_initmem_on_exec_helper(v
> char c;
>
> sys_close(fd[1]);
> - sys_read(fd[0], &c, 1);
> - free_initmem();
> + if (sys_read(fd[0], &c, 1) > 0)
> + free_initmem();
> return 0;
> }

This part does apply. I made it by hand...

>
> @@ -596,7 +596,7 @@ static void free_initmem_on_exec(void)
> int fd[2];
>
> do_pipe(fd);
> - kernel_thread(free_initmem_on_exec_helper, &fd, SIGCHLD);
> + kernel_thread(free_initmem_on_exec_helper, &fd, SIGCHLD);

Cosmetic change but yes...

>
> sys_dup2(fd[1], 255); /* to get it out of the way */
> sys_close(fd[0]);
> @@ -643,6 +643,7 @@ static int init(void * unused)
> run_init_process("/init");
>
> prepare_namespace();
> + free_initmem();

This is already done (plus a comment....)???