Re: [PATCH] ramoops: update parameters only after successful init

From: Andrew Morton
Date: Tue Oct 18 2011 - 17:45:35 EST


On Tue, 18 Oct 2011 11:01:27 -0700
Kees Cook <kees@xxxxxxxxxxx> wrote:

> If a platform device exists on the system, but ramoops fails to attach to
> it, the module parameters are overridden before ramoops can fall back and
> try to use passed module parameters. Move update to end of init routine.

Modifying the module paremeters in this way seems like a Wrong Thing To
Do and a rather nasty hack.

I'd have thought that /sys/module/ramoops/parameters should reflect the
options which were provided to the module and should not be modified by
the kernel behind everyone's back.

If we wish to display the configuration which the driver acquired from
the platform data then sure, add an interface to do that. But it's
wrong to go and pretend that this is what the user provided to
modprobe!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/