diff options
Diffstat (limited to 'arch/x86/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 1d92a5ab6e8b..b7e1e0e53987 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -47,10 +47,16 @@ EXPORT_SYMBOL_GPL(idle_notifier_unregister); | |||
47 | struct kmem_cache *task_xstate_cachep; | 47 | struct kmem_cache *task_xstate_cachep; |
48 | EXPORT_SYMBOL_GPL(task_xstate_cachep); | 48 | EXPORT_SYMBOL_GPL(task_xstate_cachep); |
49 | 49 | ||
50 | /* | ||
51 | * this gets called so that we can store lazy state into memory and copy the | ||
52 | * current task into the new thread. | ||
53 | */ | ||
50 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | 54 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) |
51 | { | 55 | { |
52 | int ret; | 56 | int ret; |
53 | 57 | ||
58 | unlazy_fpu(src); | ||
59 | |||
54 | *dst = *src; | 60 | *dst = *src; |
55 | if (fpu_allocated(&src->thread.fpu)) { | 61 | if (fpu_allocated(&src->thread.fpu)) { |
56 | memset(&dst->thread.fpu, 0, sizeof(dst->thread.fpu)); | 62 | memset(&dst->thread.fpu, 0, sizeof(dst->thread.fpu)); |