提交 7023dd3c 编写于 作者: M Ma Wupeng 提交者: Wang Wensheng

mm: Disable memory reliable when kdump is in progress

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: NMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
上级 4623cc86
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册