From e66fb7ba1bf9119e9fef53d2cf29cc1bd38ea138 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanino Date: Wed, 20 Feb 2013 13:16:02 +1100 Subject: [PATCH] kexec: export PG_hwpoison flag into vmcoreinfo This patch exports a PG_hwpoison into vmcoreinfo when CONFIG_MEMORY_FAILURE is defined. "makedumpfile" needs to read information of memory, such as 'mem_section', 'zone', 'pageflags' from vmcore. We introduce a function into "makedumpfile" to exclude hwpoison page from vmcore dump. In order to introduce this function, PG_hwpoison flag have to export into vmcoreinfo. Signed-off-by: Mitsuhiro Tanino Acked-by: "Eric W. Biederman" Cc: Mitsuhiro Tanino Cc: Vivek Goyal Signed-off-by: Andrew Morton --- kernel/kexec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/kexec.c b/kernel/kexec.c index ea097ad7cc37..2348bd6ef2af 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -1537,6 +1537,9 @@ static int __init crash_save_vmcoreinfo_init(void) VMCOREINFO_NUMBER(PG_private); VMCOREINFO_NUMBER(PG_swapcache); VMCOREINFO_NUMBER(PG_slab); +#ifdef CONFIG_MEMORY_FAILURE + VMCOREINFO_NUMBER(PG_hwpoison); +#endif VMCOREINFO_NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE); arch_crash_save_vmcoreinfo(); -- 2.39.5