diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-06-08 16:36:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-23 14:42:52 +0200 |
commit | 75a55bc2e5e64cfdcf839e06b37cbb0cb8b69459 (patch) | |
tree | 02bec51fdb142127858052c41025e86f663c434d /arch/x86/mm/ioremap.c | |
parent | ddaaf38e1923760de1bc6f5e4e02e42db327ab6e (diff) | |
download | kernel_replicant_linux-75a55bc2e5e64cfdcf839e06b37cbb0cb8b69459.tar.gz kernel_replicant_linux-75a55bc2e5e64cfdcf839e06b37cbb0cb8b69459.tar.bz2 kernel_replicant_linux-75a55bc2e5e64cfdcf839e06b37cbb0cb8b69459.zip |
x86/process: Check PF_KTHREAD and not current->mm for kernel threads
commit 12f7764ac61200e32c916f038bdc08f884b0b604 upstream.
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: 0cecca9d03c9 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/mm/ioremap.c')
0 files changed, 0 insertions, 0 deletions