aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/m68knommu/kernel/process.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index 8b3cf57ba706..99bf43824795 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -198,10 +198,9 @@ int copy_thread(int nr, unsigned long clone_flags,
198{ 198{
199 struct pt_regs * childregs; 199 struct pt_regs * childregs;
200 struct switch_stack * childstack, *stack; 200 struct switch_stack * childstack, *stack;
201 unsigned long stack_offset, *retp; 201 unsigned long *retp;
202 202
203 stack_offset = THREAD_SIZE - sizeof(struct pt_regs); 203 childregs = (struct pt_regs *) (task_stack_page(p) + THREAD_SIZE) - 1;
204 childregs = (struct pt_regs *) ((unsigned long) p->thread_info + stack_offset);
205 204
206 *childregs = *regs; 205 *childregs = *regs;
207 childregs->d0 = 0; 206 childregs->d0 = 0;