riscv: Enable interrupt during exception handling
[ Upstream commit 969f028b ] force_sig_fault() takes a spinlock, which is a sleeping lock with CONFIG_PREEMPT_RT=y. However, exception handling calls force_sig_fault() with interrupt disabled, causing a sleeping in atomic context warning. This can be reproduced using userspace programs such as: int main() { asm ("ebreak"); } or int main() { asm ("unimp"); } There is no reason that interrupt must be disabled while handling exceptions from userspace. Enable interrupt while handling user exceptions. This also has the added benefit of avoiding unnecessary delays in interrupt handling. Fixes: f0bddf50 ("riscv: entry: Convert to generic entry") Suggested-by:Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by:
Nam Cao <namcao@linutronix.de> Reviewed-by:
Alexandre Ghiti <alexghiti@rivosinc.com> Link: https://lore.kernel.org/r/20250625085630.3649485-1-namcao@linutronix.de Signed-off-by:
Palmer Dabbelt <palmer@dabbelt.com> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
Please sign in to comment