kexec: add further check to crashkernel
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 kexec: add further check to crashkernel
From: Zhenzhong Duan <[email protected]>
When add crashkernel=2M-256M, kernel don't give any warning. This is misleading sometimes.
---kernel/kexec.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
kernel/kexec.c +0 -0
@@ -1359,6 +1359,10 @@ static int __init parse_crashkernel_simple(char *cmdline,
if (*cur == '@') *crash_base = memparse(cur+1, &cur);
+ else if (*cur != ' ' && *cur != '\0') {
+ pr_warning("crashkernel: unrecognized char\n");
+ return -EINVAL;
+ }
return 0; }
-- 1.7.3
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 4 lines · DuanZhenzhong
From: Zhenzhong Duan <[email protected]>
When add crashkernel=2M-256M, kernel don't give any warning. This is misleading sometimes.
That seems reasonable.
Andrew do you want to carry this one. I don't have a good tree to stash this in.
Quoted 11 lines
Signed-off-by Zhenzhong Duan <[email protected]>---
kernel/kexec.c| 4 ++++1 files changed, 4 insertions(+), 0 deletions(-)kernel/kexec.c +0
-0@@ -1359,6 +1359,10 @@ static int __init parse_crashkernel_simple(char *cmdline,
kernel/kexec.c static int __init parse_crashkernel_simple(char *cmdline,
Quoted 10 lines
kernel/kexec.c +4
-1if (*cur =='@' ) *crash_base =memparse (cur+1 , &cur); +else if (*cur !=' ' && *cur !='\0' ) { +pr_warning ("crashkernel: unrecognized char\n" ); +return -EINVAL ; + }return 0 ; } -- 1.7.3
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec