]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:12 +0000 (09:49 +0200)
commit075c0405b0d7d9fc490609e988a3af0069596538
tree08f87b4b8854254bae79a2da6d235aa2416e08fe
parentc2c7d76585c6231bd480d828b81c1d9752a73475
openrisc: traps: Don't send signals to kernel mode threads

[ Upstream commit c88cfb5cea5f8f9868ef02cc9ce9183a26dcf20f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/openrisc/kernel/traps.c