VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: H. Peter Anvin <hpa@zytor.com> 2008-02-07 00:15:57 -0800 committer: Linus Torvalds <torvalds@woody.linux-foundation.org> 2008-02-07 08:42:30 -0800 commit: 6e16d89bcd668a95eb22add24c02d80890232b66 parent: ed7b1889da256977574663689b598d88950bbd23
Commit Summary:
Sanitize the type of struct user.u_ar0
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c
index 7596e1e94cde..7f65e71bf859 100644
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -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);