acrn-kernel/arch/mips/kernel
Thomas Bogendoerfer be297475ca 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:39:28 +01:00
..
syscalls
.gitignore
Makefile
access-helper.h
asm-offsets.c
bmips_5xxx_init.S
bmips_vec.S
branch.c
cacheinfo.c
cevt-bcm1480.c
cevt-ds1287.c
cevt-gt641xx.c
cevt-r4k.c
cevt-sb1250.c
cevt-txx9.c
cmpxchg.c
cps-vec-ns16550.S
cps-vec.S
cpu-probe.c MIPS: Loongson: Fix cpu_probe_loongson() again 2023-07-23 13:49:33 +02:00
cpu-r3k-probe.c
crash.c
crash_dump.c
csrc-bcm1480.c
csrc-ioasic.c
csrc-r4k.c
csrc-sb1250.c
early_printk.c
early_printk_8250.c
elf.c
entry.S
fpu-probe.c
fpu-probe.h
ftrace.c
genex.S
gpio_txx9.c
head.S
i8253.c
idle.c
irq-gt641xx.c
irq-msc01.c
irq.c
irq_txx9.c
jump_label.c
kgdb.c
kprobes.c
linux32.c
machine_kexec.c
mcount.S
mips-cm.c
mips-cpc.c
mips-mt-fpaff.c
mips-mt.c
mips-r2-to-r6-emul.c
module.c
octeon_switch.S
perf_event.c
perf_event_mipsxx.c
perf_regs.c
pm-cps.c
pm.c
probes-common.h
proc.c
process.c MIPS: kernel: Clear FPU states when setting up kernel threads 2023-12-13 18:39:28 +01:00
prom.c
ptrace.c
ptrace32.c
r4k-bugs64.c
r4k_fpu.S
r4k_switch.S
r2300_fpu.S
r2300_switch.S
relocate.c
relocate_kernel.S
reset.c
rtlx-cmp.c
rtlx-mt.c
rtlx.c
scall32-o32.S
scall64-n32.S
scall64-n64.S
scall64-o32.S
segment.c
setup.c mips/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:47 +02:00
signal-common.h
signal.c
signal32.c
signal_n32.c
signal_o32.c
smp-bmips.c
smp-cmp.c
smp-cps.c
smp-mt.c
smp-up.c
smp.c
spinlock_test.c
spram.c
stacktrace.c
sync-r4k.c
syscall.c
sysrq.c
time.c
topology.c
traps.c
unaligned.c
uprobes.c
vdso.c
vmlinux.lds.S
vpe-cmp.c
vpe-mt.c
vpe.c
watch.c