[PATCH] hwpoison: fix build failure

From: Ingo Molnar
Date: Thu Dec 17 2009 - 04:40:41 EST


Today's -tip fails to build due to upstream commit
1a9b5b7fe0c5dad8a635288882d36785dea742f9 ("mm: export stable
page flags") (authored and merged yesterday) causing the
following build failure on x86 when CONFIG_PROC_PAGE_MONITOR is
disabled:

mm/built-in.o: In function `hwpoison_filter':
(.text+0x39fbf): undefined reference to `stable_page_flags'

The bug is that the stable_page_flags() API is only available
under CONFIG_PROC_PAGE_MONITOR, but utilized in
mm/memory-failure.c unconditionally.

I've applied the patch below to -tip for now, which expresses
this dependency in the Kconfig. (Eventually a cleaner solution
would be to factor such ABI details out of procfs, they dont
belong there.)

Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Matt Mackall <mpm@xxxxxxxxxxx>
Cc: Nick Piggin <npiggin@xxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx>
Cc: Fr??d??ric Weisbecker <fweisbec@xxxxxxxxx>
Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Wu Fengguang <fengguang.wu@xxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
LKML-Reference: <20091217094041.GA24708@xxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
mm/Kconfig | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/Kconfig b/mm/Kconfig
index 43ea8c3..021bc12 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -243,6 +243,8 @@ config ARCH_SUPPORTS_MEMORY_FAILURE
config MEMORY_FAILURE
depends on MMU
depends on ARCH_SUPPORTS_MEMORY_FAILURE
+ depends on PROC_FS
+ select PROC_PAGE_MONITOR
bool "Enable recovery from hardware memory errors"
help
Enables code to recover from some memory failures on systems
--
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/