From 07b047fc2466249aff7cdb23fa0b0955a7a00d48 Mon Sep 17 00:00:00 2001 From: "akpm@osdl.org" Date: Thu, 12 Jan 2006 01:05:41 -0800 Subject: [PATCH] i386: fix task_pt_regs() ) From: Al Viro task_pt_regs() needs the same offset-by-8 to match copy_thread() Signed-off-by: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/i386/kernel/smpboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch/i386/kernel/smpboot.c') diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index a9bf5f222e47..255adb498268 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c @@ -875,8 +875,7 @@ static inline struct task_struct * alloc_idle_task(int cpu) /* initialize thread_struct. we really want to avoid destroy * idle tread */ - idle->thread.esp = (unsigned long)(((struct pt_regs *) - (THREAD_SIZE + (unsigned long) idle->thread_info)) - 1); + idle->thread.esp = (unsigned long)task_pt_regs(idle); init_idle(idle, cpu); return idle; } -- cgit v1.2.3