summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-22 04:33:39 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-22 04:33:39 +0200
commitab75819d3942a34d151a34fd43f346d5d8a48148 (patch)
tree60352be9c9af301e7a29567c8915490e48641957 /arch
parentpowerpc: put the "zero usp means using parent's stack pointer" to copy_thread() (diff)
downloadlinux-ab75819d3942a34d151a34fd43f346d5d8a48148.tar.xz
linux-ab75819d3942a34d151a34fd43f346d5d8a48148.zip
powerpc: make fork_idle() take the common "kernel thread" path in copy_thread()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 3665d287780f..f6d244db9203 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -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);