lkml.org 
[lkml]   [2004]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.6-mm] defer free_initmem() if we have no /init


Zwane Mwaikambo wrote:

>In the absence of /init and other nice boot goodies, we fall through to
>prepare_namespace() so we shall require initmem to complete boot.
>
>
>Index: linux-2.6.5-rc2-mm1/init/main.c
>===================================================================
>RCS file: /home/cvsroot/linux-2.6.5-rc2-mm1/init/main.c,v
>retrieving revision 1.1.1.1
>diff -u -p -B -r1.1.1.1 main.c
>--- 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;
> }
>
>

But the above change makes the early init case to not free initmem,
which was the whole purpose of the close_on_exec + read + broken pipe
hassle, I think.



--Mika


-
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/

\
 
 \ /
  Last update: 2005-03-22 14:01    [W:0.032 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site