提交 6fb0d251 编写于 作者: M Ma Wupeng 提交者: Laibin Qiu

mm: disable memory reliable when kdump is in progress

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