From: DuanZhenzhong <zhenzhong.duan@oracle.com>
To: ebiederm@xmission.com
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] kexec: add further check to crashkernel
Date: Tue, 13 Mar 2012 11:10:31 +0800 [thread overview]
Message-ID: <4F5EBAA7.50709@oracle.com> (raw)
In-Reply-To: <1329989047-20378-1-git-send-email-zhenzhong.duan@oracle.com>
From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
When add crashkernel=2M-256M, kernel don't give any warning.
This is misleading sometimes.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
---
kernel/kexec.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 7b08867..0a6d147 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -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
next parent reply other threads:[~2012-03-13 3:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1329989047-20378-1-git-send-email-zhenzhong.duan@oracle.com>
2012-03-13 3:10 ` DuanZhenzhong [this message]
2012-03-13 18:27 ` [PATCH] kexec: add further check to crashkernel Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5EBAA7.50709@oracle.com \
--to=zhenzhong.duan@oracle.com \
--cc=ebiederm@xmission.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox