module_param: stop double-calling parameters.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 8 Jun 2012 05:28:13 +0000 (14:28 +0930)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jun 2012 18:21:23 +0000 (11:21 -0700)
commit3410afedcda2f504e8fbe02a7f4c49912ce688c8
tree8a08670ff706045ab51f6a863e04469a2421c8b3
parente6e70e4c7ef345d3af2d2ba98c2d2f175aa64c2a
module_param: stop double-calling parameters.

commit ae82fdb1406ad41d68f07027fe31f2d35ba22a90 upstream.

Commit 026cee0086fe1df4cf74691cf273062cc769617d "params:
<level>_initcall-like kernel parameters" set old-style module
parameters to level 0.  And we call those level 0 calls where we used
to, early in start_kernel().

We also loop through the initcall levels and call the levelled
module_params before the corresponding initcall.  Unfortunately level
0 is early_init(), so we call the standard module_param calls twice.

(Turns out most things don't care, but at least ubi.mtd does).

Change the level to -1 for standard module_param calls.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/moduleparam.h
init/main.c