diff options
author | Lianbo Jiang <lijiang@redhat.com> | 2018-09-06 13:56:18 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2018-10-02 14:02:17 +0200 |
commit | 1ac3e4a570005707260ea3e74ac011bd926b168b (patch) | |
tree | 5a8924719dfddc6cd19fa8373029934d903d79ba | |
parent | b9de21ef51a7ceab7122a707c188602eae22c4ee (diff) | |
download | kexec-tools-1ac3e4a570005707260ea3e74ac011bd926b168b.tar.gz |
kdump: fix an error that can not parse the e820 reserved region
When kexec-tools load the kernel and initramfs for kdump, kexec-tools will
read /proc/iomem and recreate the e820 ranges for kdump kernel. But it fails
to parse the e820 reserved region, because the memcmp() is case sensitive
when comparing the string. In fact, it may be "Reserved" or "reserved" in
the /proc/iomem, so we have to fix these cases.
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
Reviewed-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index 437e8a85..140f45bb 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -289,6 +289,8 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges, type = RANGE_PMEM; } else if(memcmp(str,"reserved\n",9) == 0 ) { type = RANGE_RESERVED; + } else if (memcmp(str, "Reserved\n", 9) == 0) { + type = RANGE_RESERVED; } else if (memcmp(str, "GART\n", 5) == 0) { gart_start = start; gart_end = end; |