aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/binfmt_elf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 67d9b3148c06..fa8ea33ab0be 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -871,6 +871,8 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
871 elf_prot, elf_flags); 871 elf_prot, elf_flags);
872 if (BAD_ADDR(error)) { 872 if (BAD_ADDR(error)) {
873 send_sig(SIGKILL, current, 0); 873 send_sig(SIGKILL, current, 0);
874 retval = IS_ERR((void *)error) ?
875 PTR_ERR((void*)error) : -EINVAL;
874 goto out_free_dentry; 876 goto out_free_dentry;
875 } 877 }
876 878
@@ -900,6 +902,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
900 TASK_SIZE - elf_ppnt->p_memsz < k) { 902 TASK_SIZE - elf_ppnt->p_memsz < k) {
901 /* set_brk can never work. Avoid overflows. */ 903 /* set_brk can never work. Avoid overflows. */
902 send_sig(SIGKILL, current, 0); 904 send_sig(SIGKILL, current, 0);
905 retval = -EINVAL;
903 goto out_free_dentry; 906 goto out_free_dentry;
904 } 907 }
905 908