summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_elf.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-02-28 06:35:24 +0100
committerPaul Mackerras <paulus@samba.org>2006-02-28 06:35:24 +0100
commit6749c5507388f3fc3719f57a54b540ee83f6661a (patch)
treec069f990f86b020a14b50759d0c75475eedde186 /fs/binfmt_elf.c
parentpowerpc: Export variables used in conversions to/from cputime_t (diff)
parent[PATCH] powerpc/iseries: Fix double phys_to_abs bug in htab_bolt_mapping (diff)
downloadlinux-6749c5507388f3fc3719f57a54b540ee83f6661a.tar.xz
linux-6749c5507388f3fc3719f57a54b540ee83f6661a.zip
Merge ../powerpc-merge
Diffstat (limited to 'fs/binfmt_elf.c')
-rw-r--r--fs/binfmt_elf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 1b117a441298..c2eac2a50bd2 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -938,6 +938,11 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
kfree(elf_interpreter);
} else {
elf_entry = loc->elf_ex.e_entry;
+ if (BAD_ADDR(elf_entry)) {
+ send_sig(SIGSEGV, current, 0);
+ retval = -ENOEXEC; /* Nobody gets to see this, but.. */
+ goto out_free_dentry;
+ }
}
kfree(elf_phdata);