X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fbinfmt_som.c;h=68be580ba289fc3135a0dcd93595ce5b66062206;hb=77789ad8b1d58eb9ba5e14860f439d024c5e4120;hp=00a91dc25d164154fac1326f39129257bc72c94f;hpb=c7fb577e2a6cb04732541f2dc402bd46747f7558;p=linux-2.6-omap-h63xx.git diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c index 00a91dc25d1..68be580ba28 100644 --- a/fs/binfmt_som.c +++ b/fs/binfmt_som.c @@ -32,7 +32,6 @@ #include #include -#include #include @@ -44,7 +43,7 @@ static int load_som_library(struct file *); * don't even try. */ #if 0 -static int som_core_dump(long signr, struct pt_regs * regs); +static int som_core_dump(long signr, struct pt_regs *regs, unsigned long limit); #else #define som_core_dump NULL #endif @@ -209,15 +208,18 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) size = som_ex->aux_header_size; if (size > SOM_PAGESIZE) goto out; - hpuxhdr = (struct som_exec_auxhdr *) kmalloc(size, GFP_KERNEL); + hpuxhdr = kmalloc(size, GFP_KERNEL); if (!hpuxhdr) goto out; retval = kernel_read(bprm->file, som_ex->aux_header_location, (char *) hpuxhdr, size); - if (retval < 0) + if (retval != size) { + if (retval >= 0) + retval = -EIO; goto out_free; -#error "Fix security hole before enabling me" + } + retval = get_unused_fd(); if (retval < 0) goto out_free; @@ -272,8 +274,6 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs) map_hpux_gateway_page(current,current->mm); start_thread_som(regs, som_entry, bprm->p); - if (current->ptrace & PT_PTRACED) - send_sig(SIGTRAP, current, 0); return 0; /* error cleanup */