[PATCH] m68knommu: task_stack_page()
authorAl Viro <viro@ftp.linux.org.uk>
Thu, 12 Jan 2006 09:05:54 +0000 (01:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 17:08:55 +0000 (09:08 -0800)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/m68knommu/kernel/process.c

index 8b3cf57ba706f04043a3da3f11e590ea5d7052a0..99bf43824795e0004b2850413ac3c84450f21362 100644 (file)
@@ -198,10 +198,9 @@ int copy_thread(int nr, unsigned long clone_flags,
 {
        struct pt_regs * childregs;
        struct switch_stack * childstack, *stack;
-       unsigned long stack_offset, *retp;
+       unsigned long *retp;
 
-       stack_offset = THREAD_SIZE - sizeof(struct pt_regs);
-       childregs = (struct pt_regs *) ((unsigned long) p->thread_info + stack_offset);
+       childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
 
        *childregs = *regs;
        childregs->d0 = 0;