
From: Ma Wupeng <mawupeng1@huawei.com> hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4SK3S CVE: NA -------------------------------- Kdump only have limited memory and will lead to bugly memory reliable features if memory reliable if enabled. So disable memory reliable if kdump is in progress. Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> --- mm/mem_reliable.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/mem_reliable.c b/mm/mem_reliable.c index 876335fc4060..06d11cee52b6 100644 --- a/mm/mem_reliable.c +++ b/mm/mem_reliable.c @@ -7,6 +7,7 @@ #include <linux/memory_hotplug.h> #include <linux/seq_file.h> #include <linux/mmzone.h> +#include <linux/crash_dump.h> #define PAGES_TO_B(n_pages) ((n_pages) << PAGE_SHIFT) @@ -63,6 +64,11 @@ void mem_reliable_init(bool has_unmirrored_mem, unsigned long *zone_movable_pfn, if (!reliable_enabled) return; + if (is_kdump_kernel()) { + pr_info("ignoring memory reliable due to in crashkernel\n"); + return; + } + if (!mirrored_sz) { memset(zone_movable_pfn, 0, sizeof(unsigned long) * MAX_NUMNODES); -- 2.20.1