From: Hideo S. <sa...@de...> - 2007-02-27 02:27:24
|
On Mon, 26 Feb 2007 18:38:46 +0900, Paul Mundt wrote: > Yes, I think this is the right fix. Can you please provide a > Signed-off-by tag? I post the patch again with 'Signed-off-by tag'. --- This patch secures a room for the pt_regs structure on the kernel thread's stack top. Signed-off-by: Hideo Saito <saito@de...> diff -pU8 -Naur arch/sh/kernel/process.c.org arch/sh/kernel/process.c --- arch/sh/kernel/process.c.org Mon Feb 5 03:44:54 2007 +++ arch/sh/kernel/process.c Tue Feb 27 10:37:37 2007 @@ -258,20 +258,20 @@ int copy_thread(int nr, unsigned long cl childregs = task_pt_regs(p); *childregs = *regs; if (user_mode(regs)) { childregs->regs[15] = usp; ti->addr_limit = USER_DS; } else { - childregs->regs[15] = (unsigned long)task_stack_page(p) + THREAD_SIZE; + childregs->regs[15] = (unsigned long) childregs; ti->addr_limit = KERNEL_DS; } - if (clone_flags & CLONE_SETTLS) { + if (clone_flags & CLONE_SETTLS) { childregs->gbr = childregs->regs[0]; } childregs->regs[0] = 0; /* Set return value for child */ p->thread.sp = (unsigned long) childregs; p->thread.pc = (unsigned long) ret_from_fork; p->thread.ubc_pc = 0; |