diff options
Diffstat (limited to 'kexec/arch')
-rw-r--r-- | kexec/arch/i386/crashdump-x86.c | 8 | ||||
-rw-r--r-- | kexec/arch/x86_64/crashdump-x86_64.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/kexec/arch/i386/crashdump-x86.c b/kexec/arch/i386/crashdump-x86.c index d8fa091..b5d1d60 100644 --- a/kexec/arch/i386/crashdump-x86.c +++ b/kexec/arch/i386/crashdump-x86.c @@ -525,10 +525,12 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, * A seprate program header for Backup Region*/ for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) { unsigned long long mstart, mend; + if (crash_memory_range[i].type != RANGE_RAM) + continue; mstart = crash_memory_range[i].start; mend = crash_memory_range[i].end; if (!mstart && !mend) - break; + continue; phdr = (Elf64_Phdr *) bufp; bufp += sizeof(Elf64_Phdr); phdr->p_type = PT_LOAD; @@ -620,10 +622,12 @@ static int prepare_crash_memory_elf32_headers(struct kexec_info *info, * A seprate program header for Backup Region*/ for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) { unsigned long long mstart, mend; + if (crash_memory_range[i].type != RANGE_RAM) + continue; mstart = crash_memory_range[i].start; mend = crash_memory_range[i].end; if (!mstart && !mend) - break; + continue; phdr = (Elf32_Phdr *) bufp; bufp += sizeof(Elf32_Phdr); phdr->p_type = PT_LOAD; diff --git a/kexec/arch/x86_64/crashdump-x86_64.c b/kexec/arch/x86_64/crashdump-x86_64.c index c23fb30..2b8c3fc 100644 --- a/kexec/arch/x86_64/crashdump-x86_64.c +++ b/kexec/arch/x86_64/crashdump-x86_64.c @@ -688,12 +688,12 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, * A seprate program header for Backup Region*/ for (i = 0; i < CRASH_MAX_MEMORY_RANGES; i++) { unsigned long long mstart, mend; + if (crash_memory_range[i].type != RANGE_RAM) + continue; mstart = crash_memory_range[i].start; mend = crash_memory_range[i].end; if (!mstart && !mend) - break; - if (crash_memory_range[i].type != RANGE_RAM) - break; + continue; phdr = (Elf64_Phdr *) bufp; bufp += sizeof(Elf64_Phdr); phdr->p_type = PT_LOAD; |