aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index c0f6a119de3b..30494aab829a 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -359,7 +359,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
359 struct thread_info *thread = p->thread_info; 359 struct thread_info *thread = p->thread_info;
360 struct pt_regs *childregs; 360 struct pt_regs *childregs;
361 361
362 childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1; 362 childregs = (void *)thread + THREAD_START_SP - sizeof(*regs);
363 *childregs = *regs; 363 *childregs = *regs;
364 childregs->ARM_r0 = 0; 364 childregs->ARM_r0 = 0;
365 childregs->ARM_sp = stack_start; 365 childregs->ARM_sp = stack_start;