mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
933b787b57
commit
11c7da4b0c
1 changed files with 1 additions and 1 deletions
|
@ -1228,7 +1228,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
|
||||||
} while (*cur++ == ',');
|
} while (*cur++ == ',');
|
||||||
|
|
||||||
if (*crash_size > 0) {
|
if (*crash_size > 0) {
|
||||||
while (*cur != ' ' && *cur != '@')
|
while (*cur && *cur != ' ' && *cur != '@')
|
||||||
cur++;
|
cur++;
|
||||||
if (*cur == '@') {
|
if (*cur == '@') {
|
||||||
cur++;
|
cur++;
|
||||||
|
|
Loading…
Reference in a new issue