diff options
-rw-r--r-- | kexec/arch/x86_64/crashdump-x86_64.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kexec/arch/x86_64/crashdump-x86_64.c b/kexec/arch/x86_64/crashdump-x86_64.c index 3d0f3a5..7831cf2 100644 --- a/kexec/arch/x86_64/crashdump-x86_64.c +++ b/kexec/arch/x86_64/crashdump-x86_64.c @@ -542,6 +542,8 @@ static int prepare_crash_memory_elf64_headers(struct kexec_info *info, mend = crash_memory_range[i].end; if (!mstart && !mend) break; + if (crash_memory_range[i].type != RANGE_RAM) + break; phdr = (Elf64_Phdr *) bufp; bufp += sizeof(Elf64_Phdr); phdr->p_type = PT_LOAD; @@ -647,6 +649,8 @@ static int prepare_crash_memory_elf32_headers(struct kexec_info *info, mend = crash_memory_range[i].end; if (!mstart && !mend) break; + if (crash_memory_range[i].type != RANGE_RAM) + break; phdr = (Elf32_Phdr *) bufp; bufp += sizeof(Elf32_Phdr); phdr->p_type = PT_LOAD; |