summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2021-03-23 11:01:09 +0100
committerSimon Horman <horms@verge.net.au>2021-04-02 12:05:10 +0200
commit77ff3d6f49e87d071ac27dc49d2ca5a07c9fba6c (patch)
treeb413c418a2a127b1689574240d00d2f35a93cc11
parent717585968d64b2a833f4e4987cd0bd12551ee1ba (diff)
downloadkexec-tools-77ff3d6f49e87d071ac27dc49d2ca5a07c9fba6c.tar.gz
crashdump/x86: iterate only over actual crash memory ranges
No need to iterate over empty entries. Cc: Simon Horman <horms@verge.net.au> Signed-off-by: David Hildenbrand <david@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 a301ac8f..43e830a3 100644
--- a/kexec/arch/i386/crashdump-x86.c
+++ b/kexec/arch/i386/crashdump-x86.c
@@ -988,7 +988,7 @@ int load_crashdump_segments(struct kexec_info *info, char* mod_cmdline,
cmdline_add_elfcorehdr(mod_cmdline, elfcorehdr);
/* Inform second kernel about the presence of ACPI tables. */
- for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) {
+ for (i = 0; i < nr_ranges; i++) {
unsigned long start, end, size, type;
if ( !( mem_range[i].type == RANGE_ACPI
|| mem_range[i].type == RANGE_ACPI_NVS