X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fbinfmt_aout.c;h=a1bb2244cac772dd31dd8caff79b99fcead5ac3d;hb=59eb1ca7a8906412478656ba79261036261f4b76;hp=e176d195e7e53982659388b970d60270f9bb695b;hpb=e6d5a11dad44b8ae18ca8fc4ecb72ccccfa0a2d2;p=linux-2.6 diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index e176d195e7..a1bb2244ca 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c @@ -28,6 +28,7 @@ #include #include #include +#include static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout_library(struct file*); @@ -115,10 +116,10 @@ static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, u current->flags |= PF_DUMPCORE; strncpy(dump.u_comm, current->comm, sizeof(dump.u_comm)); #ifndef __sparc__ - dump.u_ar0 = (void *)(((unsigned long)(&dump.regs)) - ((unsigned long)(&dump))); + dump.u_ar0 = offsetof(struct user, regs); #endif dump.signal = signr; - dump_thread(regs, &dump); + aout_dump_thread(regs, &dump); /* If the size of the dump file exceeds the rlimit, then see what would happen if we wrote the stack, but not the data area. */ @@ -319,7 +320,6 @@ static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs) current->mm->free_area_cache = current->mm->mmap_base; current->mm->cached_hole_size = 0; - current->mm->mmap = NULL; compute_creds(bprm); current->flags &= ~PF_FORKNOEXEC; #ifdef __sparc__