linux-stable/arch/x86/include
Thomas Gleixner 12f7764ac6 x86/process: Check PF_KTHREAD and not current->mm for kernel threads
switch_fpu_finish() checks current->mm as indicator for kernel threads.
That's wrong because kernel threads can temporarily use a mm of a user
process via kthread_use_mm().

Check the task flags for PF_KTHREAD instead.

Fixes: 0cecca9d03 ("x86/fpu: Eager switch PKRU state")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Rik van Riel <riel@surriel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20210608144345.912645927@linutronix.de
2021-06-09 10:39:04 +02:00
..
asm x86/process: Check PF_KTHREAD and not current->mm for kernel threads 2021-06-09 10:39:04 +02:00
uapi/asm KVM: nVMX: Properly pad 'struct kvm_vmx_nested_state_hdr' 2021-05-07 06:06:13 -04:00