diff options
Diffstat (limited to 'arch/x86/kernel/fpu/core.c')
-rw-r--r-- | arch/x86/kernel/fpu/core.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c index e4c20908ee49..4a2193892e5d 100644 --- a/arch/x86/kernel/fpu/core.c +++ b/arch/x86/kernel/fpu/core.c @@ -683,7 +683,13 @@ int fpu_clone(struct task_struct *dst, unsigned long clone_flags, bool minimal, */ void fpu__drop(struct task_struct *tsk) { - struct fpu *fpu = x86_task_fpu(tsk); + struct fpu *fpu; + + /* PF_KTHREAD tasks do not use the FPU context area: */ + if (tsk->flags & (PF_KTHREAD | PF_USER_WORKER)) + return; + + fpu = x86_task_fpu(tsk); preempt_disable(); |