提交 ab75819d 编写于 作者: A Al Viro

powerpc: make fork_idle() take the common "kernel thread" path in copy_thread()

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 ea516b11
......@@ -745,7 +745,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
/* Copy registers */
sp -= sizeof(struct pt_regs);
childregs = (struct pt_regs *) sp;
if (!regs) {
if (unlikely(p->flags & PF_KTHREAD)) {
struct thread_info *ti = (void *)task_stack_page(p);
memset(childregs, 0, sizeof(struct pt_regs));
childregs->gpr[1] = sp + sizeof(struct pt_regs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册