From: "Mika Penttilä" <mika.penttila@kolumbus.fi>
To: Zwane Mwaikambo <zwane@linuxpower.ca>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
olh@suse.de
Subject: Re: [PATCH][2.6-mm] defer free_initmem() if we have no /init
Date: Mon, 22 Mar 2004 09:04:22 +0200 [thread overview]
Message-ID: <405E8FF6.5020607@kolumbus.fi> (raw)
In-Reply-To: <Pine.LNX.4.58.0403220132060.28727@montezuma.fsmlabs.com>
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
next prev parent reply other threads:[~2004-03-22 6:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-22 6:41 [PATCH][2.6-mm] defer free_initmem() if we have no /init Zwane Mwaikambo
2004-03-22 7:04 ` Mika Penttilä [this message]
2004-03-22 7:49 ` Olaf Hering
2004-03-22 8:12 ` Zwane Mwaikambo
2004-03-22 8:15 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=405E8FF6.5020607@kolumbus.fi \
--to=mika.penttila@kolumbus.fi \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olh@suse.de \
--cc=zwane@linuxpower.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox