aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/machine_kexec_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/machine_kexec_file.c')
-rw-r--r--arch/s390/kernel/machine_kexec_file.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
index a8bfa7c8cbba..876cdd3c994e 100644
--- a/arch/s390/kernel/machine_kexec_file.c
+++ b/arch/s390/kernel/machine_kexec_file.c
@@ -296,6 +296,7 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
const Elf_Shdr *sechdrs;
Elf_Rela *relas;
int i, r_type;
+ int ret;
/* String & section header string table */
sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
@@ -347,7 +348,11 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
addr = section->sh_addr + relas[i].r_offset;
r_type = ELF64_R_TYPE(relas[i].r_info);
- arch_kexec_do_relocs(r_type, loc, val, addr);
+ ret = arch_kexec_do_relocs(r_type, loc, val, addr);
+ if (ret) {
+ pr_err("Unknown rela relocation: %d\n", r_type);
+ return -ENOEXEC;
+ }
}
return 0;
}