openrisc: traps: Don't send signals to kernel mode threads
authorStafford Horne <shorne@gmail.com>
Sat, 30 Mar 2024 14:42:49 +0000 (14:42 +0000)
committerStafford Horne <shorne@gmail.com>
Mon, 15 Apr 2024 14:20:39 +0000 (15:20 +0100)
commitc88cfb5cea5f8f9868ef02cc9ce9183a26dcf20f
tree7a540360edcd323aa19033278defb4219096ab27
parentee7e551d28aa03664ead6b45154e20644a2f1040
openrisc: traps: Don't send signals to kernel mode threads

OpenRISC exception handling sends signals to user processes on floating
point exceptions and trap instructions (for debugging) among others.
There is a bug where the trap handling logic may send signals to kernel
threads, we should not send these signals to kernel threads, if that
happens we treat it as an error.

This patch adds conditions to die if the kernel receives these
exceptions in kernel mode code.

Fixes: 27267655c531 ("openrisc: Support floating point user api")
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/traps.c