summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Chao <chaowang@redhat.com>2014-05-08 19:26:17 +0800
committerSimon Horman <horms@verge.net.au>2014-05-11 08:39:49 +0900
commit981a689f09535a53fb4e179a3dd8305770656245 (patch)
treebc0a7cfe9e06adcad5b0bb9109764d0bf5544eda
parentceb4fb0dce020117269e8ab3adae414ace9f6987 (diff)
downloadkexec-tools-981a689f09535a53fb4e179a3dd8305770656245.tar.gz
condition check fix
In commit 91f5b9c ("kdump: pass e820 reserved region to 2nd kernel via e820 table or setup_data"), I made a wrong condition check. We should only add cmdline for a memory range if --pass-memmap-cmdline and the range type isn't RANGE_RESERVED. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/arch/i386/crashdump-x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c
index cc33347..999a837 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -1000,7 +1000,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
type = mem_range[i].type;
size = end - start + 1;
add_memmap(memmap_p, &nr_memmap, start, size, type);
- if (arch_options.pass_memmap_cmdline || type != RANGE_RESERVED)
+ if (arch_options.pass_memmap_cmdline && type != RANGE_RESERVED)
cmdline_add_memmap_acpi(mod_cmdline, start, end);
}