diff options
author | Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> | 2014-01-23 15:54:56 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 16:36:58 -0800 |
commit | 499a4584d7f817d43d09ccfc6bb26315eeaab6bc (patch) | |
tree | 571e45ed5894c452402fef44ac4f03bc85d08f81 /init/main.c | |
parent | 128e3f4541ec844c90a99320bf7d2909da4ef80b (diff) | |
download | linux-499a4584d7f817d43d09ccfc6bb26315eeaab6bc.tar.gz linux-499a4584d7f817d43d09ccfc6bb26315eeaab6bc.tar.bz2 linux-499a4584d7f817d43d09ccfc6bb26315eeaab6bc.zip |
init: fix possible format string bug
Use constant format string in case message changes.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c index 98e3537fa71d..f333385d9a4f 100644 --- a/init/main.c +++ b/init/main.c @@ -278,7 +278,7 @@ static int __init unknown_bootoption(char *param, char *val, const char *unused) unsigned int i; for (i = 0; envp_init[i]; i++) { if (i == MAX_INIT_ENVS) { - panic_later = "Too many boot env vars at `%s'"; + panic_later = "env"; panic_param = param; } if (!strncmp(param, envp_init[i], val - param)) @@ -290,7 +290,7 @@ static int __init unknown_bootoption(char *param, char *val, const char *unused) unsigned int i; for (i = 0; argv_init[i]; i++) { if (i == MAX_INIT_ARGS) { - panic_later = "Too many boot init vars at `%s'"; + panic_later = "init"; panic_param = param; } } @@ -582,7 +582,8 @@ asmlinkage void __init start_kernel(void) */ console_init(); if (panic_later) - panic(panic_later, panic_param); + panic("Too many boot %s vars at `%s'", panic_later, + panic_param); lockdep_info(); |