Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6.git] / arch / arm / kernel / process.c
index c0f6a119de3b903c7bbe44d8d28699473205d3a6..30494aab829a8adeb68a165c168aa6cd8593cf39 100644 (file)
@@ -359,7 +359,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
        struct thread_info *thread = p->thread_info;
        struct pt_regs *childregs;
 
-       childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1;
+       childregs = (void *)thread + THREAD_START_SP - sizeof(*regs);
        *childregs = *regs;
        childregs->ARM_r0 = 0;
        childregs->ARM_sp = stack_start;