提交 c9fbd394 编写于 作者: M Ma Wupeng 提交者: openeuler-sync-bot

efi: Disable mirror feature during crashkernel

hulk inclusion
category: cleanup
bugzilla: https://gitee.com/openeuler/kernel/issues/I6WKXZ
CVE: NA

--------------------------------

If system have no mirrored memory or use crashkernel.high while
kernelcore=mirror is enabled in cmdline, during crashkernel,
there will be limited mirrored memory and this usually lead to
OOM.

To solve this problem, disable mirror feature during crashkernel.
Signed-off-by: NMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: NKefeng Wang <wangkefeng.wang@huawei.com>
(cherry picked from commit 2bbd51a7)
上级 6a250048
......@@ -31,6 +31,7 @@
#include <linux/ucs2_string.h>
#include <linux/memblock.h>
#include <linux/security.h>
#include <linux/crash_dump.h>
#include <asm/early_ioremap.h>
......@@ -446,6 +447,11 @@ void __init efi_find_mirror(void)
if (!mirrored_kernelcore)
return;
if (is_kdump_kernel()) {
mirrored_kernelcore = false;
return;
}
for_each_efi_memory_desc(md) {
unsigned long long start = md->phys_addr;
unsigned long long size = md->num_pages << EFI_PAGE_SHIFT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册