From: Thomas Petazzoni <thomas.petazzoni@enix.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH][RFC] Drop the "static __initdata" from tmp_cmdline in
Date: Thu, 13 Sep 2007 15:11:27 +0000 [thread overview]
Message-ID: <46E9531F.4060808@enix.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0709131043070.4208@localhost.localdomain>
Hi,
Robert P. J. Day wrote:
> --- a/init/main.c
> +++ b/init/main.c
> @@ -482,7 +482,7 @@ static int __init do_early_param(char *param, char *val)
> void __init parse_early_param(void)
> {
> static __initdata int done = 0;
> - static __initdata char tmp_cmdline[COMMAND_LINE_SIZE];
> + char tmp_cmdline[COMMAND_LINE_SIZE];
As I've said in an answer to an e-mail from you on the kernelnewbies
mailing list, this change is going to allocate 2k on the stack, which is
quite big compared to the overall stack size. If you use 8k stacks, it
may still work, but with 4k stacks, it eats half of the stack, leaving
only 2k for the rest of the code to execute, which may not be enough. I
think that why this buffer is static.
Sincerly,
Thomas
--
PETAZZONI Thomas - thomas.petazzoni@enix.org
http://thomas.enix.org - Jabber: thomas.petazzoni@jabber.dk
KOS: http://kos.enix.org/ - SOS: http://sos.enix.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E 1624 F653 CB30 98D3 F7A7
next prev parent reply other threads:[~2007-09-13 15:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 15:01 [PATCH][RFC] Drop the "static __initdata" from tmp_cmdline in Robert P. J. Day
2007-09-13 15:11 ` Thomas Petazzoni [this message]
2007-09-13 16:31 ` Robert P. J. Day
2007-09-13 18:12 ` Robert P. J. Day
2007-10-06 16:32 ` walter harms
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=46E9531F.4060808@enix.org \
--to=thomas.petazzoni@enix.org \
--cc=kernel-janitors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.