diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-07-30 00:02:08 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-30 04:10:34 +0200 |
commit | 11c7da4b0ca76a57f51c996c883c480e203cf5a9 (patch) | |
tree | 25c816507896a6ec7b2a84c72e181080b6cc744d /kernel/kexec.c | |
parent | mm: copy over oom_adj value at fork time (diff) | |
download | linux-11c7da4b0ca76a57f51c996c883c480e203cf5a9.tar.xz linux-11c7da4b0ca76a57f51c996c883c480e203cf5a9.zip |
kexec: fix omitting offset in extended crashkernel syntax
Setting
"crashkernel=512M-2G:64M,2G-:128M"
does not work but it turns to work if it has a trailing-whitespace,
like
"crashkernel=512M-2G:64M,2G-:128M ".
It was because of a bug in the parser, running over the cmdline.
This patch adds a check of the termination.
Reported-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Tested-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kexec.c')
-rw-r--r-- | kernel/kexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c index ae1c35201cc8..f336e2107f98 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1228,7 +1228,7 @@ static int __init parse_crashkernel_mem(char *cmdline, } while (*cur++ == ','); if (*crash_size > 0) { - while (*cur != ' ' && *cur != '@') + while (*cur && *cur != ' ' && *cur != '@') cur++; if (*cur == '@') { cur++; |