All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH][RFC] Drop the "static __initdata" from tmp_cmdline in
Date: Sat, 06 Oct 2007 16:32:45 +0000	[thread overview]
Message-ID: <4707B8AD.8040300@bfs.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0709131043070.4208@localhost.localdomain>


would a kalloc/free be suffizient ? some could do it like strdup().

re,
 wh


Thomas Petazzoni wrote:
> 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

      parent reply	other threads:[~2007-10-06 16:32 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
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 [this message]

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=4707B8AD.8040300@bfs.de \
    --to=wharms@bfs.de \
    --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.