* [PATCH] kexec: add further check to crashkernel
[not found] <1329989047-20378-1-git-send-email-zhenzhong.duan@oracle.com>
@ 2012-03-13 3:10 ` DuanZhenzhong
0 siblings, 0 replies; 4+ messages in thread
From: DuanZhenzhong @ 2012-03-13 3:10 UTC (permalink / raw)
To: ebiederm; +Cc: kexec, linux-kernel
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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] kexec: add further check to crashkernel
@ 2012-03-13 3:10 ` DuanZhenzhong
0 siblings, 0 replies; 4+ messages in thread
From: DuanZhenzhong @ 2012-03-13 3:10 UTC (permalink / raw)
To: ebiederm; +Cc: kexec, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kexec: add further check to crashkernel
2012-03-13 3:10 ` DuanZhenzhong
@ 2012-03-13 18:27 ` Eric W. Biederman
-1 siblings, 0 replies; 4+ messages in thread
From: Eric W. Biederman @ 2012-03-13 18:27 UTC (permalink / raw)
To: DuanZhenzhong; +Cc: Andrew Morton, kexec, linux-kernel
DuanZhenzhong <zhenzhong.duan@oracle.com> writes:
> From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
>
> 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.
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 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
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kexec: add further check to crashkernel
@ 2012-03-13 18:27 ` Eric W. Biederman
0 siblings, 0 replies; 4+ messages in thread
From: Eric W. Biederman @ 2012-03-13 18:27 UTC (permalink / raw)
To: DuanZhenzhong; +Cc: kexec, linux-kernel, Andrew Morton
DuanZhenzhong <zhenzhong.duan@oracle.com> writes:
> From: Zhenzhong Duan <zhenzhong.duan@oracle.com>
>
> 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.
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-13 18:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1329989047-20378-1-git-send-email-zhenzhong.duan@oracle.com>
2012-03-13 3:10 ` [PATCH] kexec: add further check to crashkernel DuanZhenzhong
2012-03-13 3:10 ` DuanZhenzhong
2012-03-13 18:27 ` Eric W. Biederman
2012-03-13 18:27 ` Eric W. Biederman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.