
From: Ma Wupeng <mawupeng1@huawei.com> 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 <mawupeng1@huawei.com> Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- include/linux/mm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 460b8d4cae877..72532a1d2d20e 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) && \ -- 2.25.1