]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/binfmt_aout.c
Sanitize the type of struct user.u_ar0
[linux-2.6-omap-h63xx.git] / fs / binfmt_aout.c
index e176d195e7e53982659388b970d60270f9bb695b..7f65e71bf8595b6f5c5047dc86d26236b933c63c 100644 (file)
@@ -115,7 +115,7 @@ 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);
@@ -319,7 +319,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__