[PATCH] i386: fix task_pt_regs()
) From: Al Viro <viro@ftp.linux.org.uk> task_pt_regs() needs the same offset-by-8 to match copy_thread() 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>
This commit is contained in:

committed by
Linus Torvalds

parent
06b425d80f
commit
07b047fc24
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user