summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/kexec_file.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index b06b1fac5252..81ba4f782486 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -941,22 +941,8 @@ int kexec_load_purgatory(struct kimage *image, unsigned long min,
if (kexec_purgatory_size <= 0)
return -EINVAL;
- if (kexec_purgatory_size < sizeof(Elf_Ehdr))
- return -ENOEXEC;
-
pi->ehdr = (Elf_Ehdr *)kexec_purgatory;
- if (memcmp(pi->ehdr->e_ident, ELFMAG, SELFMAG) != 0
- || pi->ehdr->e_type != ET_REL
- || !elf_check_arch(pi->ehdr)
- || pi->ehdr->e_shentsize != sizeof(Elf_Shdr))
- return -ENOEXEC;
-
- if (pi->ehdr->e_shoff >= kexec_purgatory_size
- || (pi->ehdr->e_shnum * sizeof(Elf_Shdr) >
- kexec_purgatory_size - pi->ehdr->e_shoff))
- return -ENOEXEC;
-
ret = __kexec_load_purgatory(image, min, max, top_down);
if (ret)
return ret;