x86/process: Clone FPU in copy_thread()
[linux-2.6-block.git] / arch / x86 / kernel / process.c
index 1d9463e3096b68307e96445026e19cd01d98464e..d2227c55e683855c1932da87402d71214eaf6167 100644 (file)
@@ -87,7 +87,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
 #ifdef CONFIG_VM86
        dst->thread.vm86 = NULL;
 #endif
-       return fpu_clone(dst);
+       return 0;
 }
 
 /*
@@ -154,6 +154,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg,
        frame->flags = X86_EFLAGS_FIXED;
 #endif
 
+       fpu_clone(p);
+
        /* Kernel thread ? */
        if (unlikely(p->flags & PF_KTHREAD)) {
                p->thread.pkru = pkru_get_init_value();