Skip to contentSkip to conversation

kexec: add further check to crashkernel

PATCH In review DuanZhenzhong 2 participants 2 messages Mar 13, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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
index 7b08867..0a6d147 100644
@@ -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

Acked-by on v1 1/1
#2 lore raw
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

---
kernel/kexec.c | 4 ++++

1 files changed, 4 insertions(+), 0 deletions(-)
kernel/kexec.c +0 -0
index 7b08867..0a6d147 100644
@@ -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 -1
 	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