From: David Rientjes <rientjes@google.com>
To: Xishi Qiu <qiuxishi@huawei.com>
Cc: Vegard Nossum <vegard.nossum@gmail.com>,
Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: mm: OS boot failed when set command-line kmemcheck=1
Date: Tue, 18 Feb 2014 23:49:42 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.02.1402182344001.3551@chino.kir.corp.google.com> (raw)
In-Reply-To: <5304558F.9050605@huawei.com>
On Wed, 19 Feb 2014, Xishi Qiu wrote:
> Hi all,
>
> CONFIG_KMEMCHECK=y and set command-line "kmemcheck=1", I find OS
> boot failed. The kernel is v3.14.0-rc3
>
> If set "kmemcheck=1 nowatchdog", OS will boot successfully.
>
I have automated kernel boots that have both "kmemcheck=0" and
"kmemcheck=1" as the last parameter in the kernel command line every
night and I've never seen it fail on tip or linux-next before.
So I'm sure I won't be able to reproduce your issue, but it may have
something to do with your bootloader that isn't described above. The
sscanf() really wants to be replaced with kstrtoint().
Could you try this out?
diff --git a/arch/x86/mm/kmemcheck/kmemcheck.c b/arch/x86/mm/kmemcheck/kmemcheck.c
--- a/arch/x86/mm/kmemcheck/kmemcheck.c
+++ b/arch/x86/mm/kmemcheck/kmemcheck.c
@@ -78,10 +78,16 @@ early_initcall(kmemcheck_init);
*/
static int __init param_kmemcheck(char *str)
{
+ int val;
+ int ret;
+
if (!str)
return -EINVAL;
- sscanf(str, "%d", &kmemcheck_enabled);
+ ret = kstrtoint(str, 0, &val);
+ if (ret)
+ return ret;
+ kmemcheck_enabled = val;
return 0;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-02-19 7:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 6:56 Xishi Qiu
2014-02-19 7:49 ` David Rientjes [this message]
2014-02-19 9:35 ` Xishi Qiu
2014-02-19 22:24 ` David Rientjes
2014-02-26 8:12 ` Xishi Qiu
2014-02-26 8:43 ` Peter Zijlstra
2014-02-26 10:14 ` Vegard Nossum
2014-02-26 10:30 ` Peter Zijlstra
2014-03-12 9:15 ` Xishi Qiu
2014-02-19 22:14 ` [patch] x86, kmemcheck: Use kstrtoint() instead of sscanf() David Rientjes
2014-03-03 13:14 ` Pekka Enberg
2014-03-04 5:07 ` David Rientjes
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=alpine.DEB.2.02.1402182344001.3551@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=qiuxishi@huawei.com \
--cc=vegard.nossum@gmail.com \
/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