lkml.org 
[lkml]   [2014]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: mm: OS boot failed when set command-line kmemcheck=1
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;
}


\
 
 \ /
  Last update: 2014-02-19 09:21    [W:0.130 / U:1.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site