From: Youling Tang <[email protected]> During kdump operations, the capture kernel cannot reuse the "mem=" parameter from the production kernel. The "mem=" parameter is used to specify the available memory range for the kernel. Reusing the "mem=" memory range may destroy the production environment.
Signed-off-by: Youling Tang <[email protected]> --- kexec/kexec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kexec/kexec.c b/kexec/kexec.c index c9e4bcb..fadf986 100644 --- a/kexec/kexec.c +++ b/kexec/kexec.c @@ -1256,8 +1256,10 @@ char *get_command_line(void) *p = '\0'; remove_parameter(line, "BOOT_IMAGE"); - if (kexec_flags & KEXEC_ON_CRASH) + if (kexec_flags & KEXEC_ON_CRASH) { remove_parameter(line, "crashkernel"); + remove_parameter(line, "mem="); + } return line; } -- 2.48.1
