[lkml]   [2006]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: 2.6.18-rc3-mm2 early_param mem= fix
    Hugh Dickins <> writes:

    > On Sun, 6 Aug 2006, Hugh Dickins wrote:
    >> I was impressed by how fast 2.6.18-rc3-mm2 is under memory pressure,
    >> until I noticed that my "mem=512M" boot option was doing nothing. The
    >> two fixes below got it working, but I wonder how many other early_param
    >> "option=" args are wrong (e.g. "memmap=" in the same file): x86_64
    >> shows many such, i386 shows only one, I've not followed it up further.
    > Oh, and that's not enough for it to show up in x86_64's /proc/cmdline.

    The /proc/cmdline part is easy.

    Someone deleted the copy from saved_command_line to command_line.
    Since kernel/params.c:parse_args called in init/main.c is destructive
    if we don't do this we will never see a reasonable command line in /proc,
    and /init implementations that parse /proc/command_line will choke horribly.

    Signed-off-by: Eric W. Biederman <>

    diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
    index 3bc1ff4..37206a4 100644
    --- a/arch/x86_64/kernel/setup.c
    +++ b/arch/x86_64/kernel/setup.c
    @@ -378,7 +378,8 @@ #endif

    - *cmdline_p = saved_command_line;
    + memcpy(command_line, saved_command_line, COMMAND_LINE_SIZE);
    + *cmdline_p = command_line;


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at
     \ /
      Last update: 2006-08-07 23:15    [W:0.028 / U:159.172 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site