X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fbinfmt_elf.c;h=6fa6adc409726e8b79038bbdac31e510e248fed7;hb=01d445f89d68187c9ada7b58ca939dbb987c9fbd;hp=c374be51b041a698341ddbda6b9fc5fe1329df46;hpb=f2cbb4f01936a3e4225692e03b084b78c56d386d;p=karo-tx-linux.git diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index c374be51b041..6fa6adc40972 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -773,8 +773,8 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) /* Do this so that we can load the interpreter, if need be. We will change some of these later */ - set_mm_counter(current->mm, rss, 0); current->mm->free_area_cache = current->mm->mmap_base; + current->mm->cached_hole_size = 0; retval = setup_arg_pages(bprm, randomize_stack_top(STACK_TOP), executable_stack); if (retval < 0) { @@ -904,7 +904,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs) send_sig(SIGKILL, current, 0); goto out_free_dentry; } - if (padzero(elf_bss)) { + if (likely(elf_bss != elf_brk) && unlikely(padzero(elf_bss))) { send_sig(SIGSEGV, current, 0); retval = -EFAULT; /* Nobody gets to see this, but.. */ goto out_free_dentry; @@ -1125,7 +1125,7 @@ static int dump_write(struct file *file, const void *addr, int nr) return file->f_op->write(file, addr, nr, &file->f_pos) == nr; } -static int dump_seek(struct file *file, off_t off) +static int dump_seek(struct file *file, loff_t off) { if (file->f_op->llseek) { if (file->f_op->llseek(file, off, 0) != off) @@ -1502,9 +1502,7 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file) fill_psinfo(psinfo, current->group_leader, current->mm); fill_note(notes +1, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); - fill_note(notes +2, "CORE", NT_TASKSTRUCT, sizeof(*current), current); - - numnote = 3; + numnote = 2; auxv = (elf_addr_t *) current->mm->saved_auxv;