
From: Ma Wupeng <mawupeng1@huawei.com> hulk inclusion category: bugfix 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> Signed-off-by: Laibin Qiu <qiulaibin@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 033af716610f..5505577d3784 100644 --- a/mm/mem_reliable.c +++ b/mm/mem_reliable.c @@ -9,6 +9,7 @@ #include <linux/seq_file.h> #include <linux/mmzone.h> #include <linux/oom.h> +#include <linux/crash_dump.h> #define MEM_RELIABLE_RESERVE_MIN (256UL << 20) @@ -128,6 +129,11 @@ void mem_reliable_init(bool has_unmirrored_mem, unsigned long *zone_movable_pfn) if (!reliable_enabled) return; + if (is_kdump_kernel()) { + pr_err("init failed, the kdump is in progress\n"); + return; + } + if (atomic_long_read(&total_reliable_mem) == 0) { memset(zone_movable_pfn, 0, sizeof(unsigned long) * MAX_NUMNODES); -- 2.22.0