Re: KMEMCHECK: linux-next: kernel BUG atarch/x86/mm/kmemcheck/kmemcheck.c:297!

From: Vegard Nossum
Date: Sun Mar 15 2009 - 13:47:29 EST


2009/3/11 Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>:
> Hello.
>
> I encountered this.
>
> [ 0.004000] ------------[ cut here ]------------
> [ 0.004000] kernel BUG at arch/x86/mm/kmemcheck/kmemcheck.c:297!

Hi, thanks for this report!

I have a feeling that the following patch might fix it. Please try it out
only if you have the time. I will also try to reproduce it when I have the
time myself.


Vegard


diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 6d63e3d..86f7398 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -146,7 +146,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
if (!after_bootmem)
init_gbpages();

-#ifdef CONFIG_DEBUG_PAGEALLOC
+#if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_KMEMCHECK)
/*
* For CONFIG_DEBUG_PAGEALLOC, identity mapping will use small pages.
* This will simplify cpa(), which otherwise needs to support splitting
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/