From 4c480319e60a0e952d3102c1e8efc60ddd7f239a Mon Sep 17 00:00:00 2001 From: Ma Wupeng Date: Fri, 4 Mar 2022 11:41:17 +0800 Subject: [PATCH] efi: Stub mirrored_kernelcore if CONFIG_HAVE_MEMBLOCK_NODE_MAP is not enabled hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA ------------------------------------------ Stub mirrored_kernelcore if CONFIG_HAVE_MEMBLOCK_NODE_MAP is not enabled. If CONFIG_HAVE_MEMBLOCK_NODE_MAP is disabled, mirrored_kernelcore in efi_find_mirror() will be undeclared and this will lead to compile problem. Fixes: d7421c3f51a3 ("efi: Disable mirror feature if kernelcore is not spcified") Signed-off-by: Ma Wupeng Reviewed-by: Kefeng Wang Signed-off-by: Yang Yingliang --- include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 460b8d4cae87..72532a1d2d20 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -2272,6 +2272,8 @@ extern void sparse_memory_present_with_active_regions(int nid); extern bool mirrored_kernelcore; +#else +#define mirrored_kernelcore 0 #endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */ #if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \ -- GitLab