Commit ab75819d authored by Al Viro's avatar Al Viro

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

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment