diff options
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r-- | fs/binfmt_elf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 9cc4f0a8aaae..fa8ea33ab0be 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/highuid.h> | 32 | #include <linux/highuid.h> |
33 | #include <linux/smp.h> | 33 | #include <linux/smp.h> |
34 | #include <linux/smp_lock.h> | ||
35 | #include <linux/compiler.h> | 34 | #include <linux/compiler.h> |
36 | #include <linux/highmem.h> | 35 | #include <linux/highmem.h> |
37 | #include <linux/pagemap.h> | 36 | #include <linux/pagemap.h> |
@@ -39,6 +38,7 @@ | |||
39 | #include <linux/syscalls.h> | 38 | #include <linux/syscalls.h> |
40 | #include <linux/random.h> | 39 | #include <linux/random.h> |
41 | #include <linux/elf.h> | 40 | #include <linux/elf.h> |
41 | #include <linux/utsname.h> | ||
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <asm/param.h> | 43 | #include <asm/param.h> |
44 | #include <asm/page.h> | 44 | #include <asm/page.h> |
@@ -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 | ||