Re: [PATCH] init: fix bug where environment vars can't be passedvia boot args

From: Chris Metcalf
Date: Fri Apr 20 2012 - 11:16:23 EST

On 4/20/2012 12:17 AM, Andrew Morton wrote:
> On Fri, 6 Apr 2012 12:53:50 -0400
> Chris Metcalf <cmetcalf@xxxxxxxxxx> wrote:
>> Commit 026cee0086f had the side-effect of dropping the '=' from
>> the unknown boot arguments that are passed to init as environment
>> variables. This is because parse_args() puts a NUL in the string
>> where the '=' was when it passes the "param" and "val" pointers
>> to the parsing subfunctions. Previously, unknown_bootoption() was
>> the last parse_args() subfunction to run, and it carefully put back
>> the '=' character. Now ignore_unknown_bootoption() is the last
>> one to run, and it wasn't doing the necessary repair, so the
>> envp params ended up with the embedded NUL and were no longer
>> seen as valid environment variables by init.
> This patch has been stuck in your tree for a week or two. The copy
> there is missing Woody's Tested-by and (I suspect) his Reported-by and
> Pawel's Acked-by.

I pushed it by accident - sorry. I'll double-check my pending changes more
carefully in the future. I meant for that tree only to hold tile-specific
stuff, but I had the boot-argument change in my tree so I could do more
effective testing. I'm on vacation till Tuesday in Croatia, unfortunately,
so I don't really want to try to do more than email.

> And because that patch is already in linux-next, I can't (or rather
> don't want to) merge it myself.
> It needs to be merged into 3.4. Please fix up the changelog data and
> send it in?

I will either fix it up and move it to my stable tree for 3.4 on Wednesday
when I'm back in the office, and ask Linus to pull it, or if you want to
push it, presumably it shouldn't conflict much for linux-next.

Chris Metcalf, Tilera Corp.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at