Thomas Bogendoerfer 6d9cbae4c0 MIPS: kernel: Clear FPU states when setting up kernel threads
commit a58a173444a68412bb08849bd81c679395f20ca0 upstream.

io_uring sets up the io worker kernel thread via a syscall out of an
user space prrocess. This process might have used FPU and since
copy_thread() didn't clear FPU states for kernel threads a BUG()
is triggered for using FPU inside kernel. Move code around
to always clear FPU state for user and kernel threads.

Cc: stable@vger.kernel.org
Reported-by: Aurelien Jarno <aurel32@debian.org>
Closes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1055021
Suggested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-13 18:45:34 +01:00
..
2021-04-07 16:11:05 +02:00
2022-05-04 22:22:59 +02:00
2022-03-01 10:07:22 +01:00
2022-02-23 13:08:30 +01:00
2022-03-01 10:07:22 +01:00
2022-03-01 10:07:22 +01:00
2021-02-15 12:23:54 +01:00
2022-02-22 09:35:49 +01:00
2022-05-19 19:30:31 +02:00
2022-02-22 09:35:49 +01:00
2022-02-22 09:35:49 +01:00
2023-06-26 13:39:10 -07:00
2022-02-22 09:35:49 +01:00
2022-03-28 17:29:53 -07:00
2023-06-09 10:34:14 +02:00
2023-06-29 15:01:51 -07:00
2023-04-27 17:46:52 -07:00
2020-05-07 11:55:47 +02:00