diff options
| author | Nam Cao <[email protected]> | 2025-06-25 08:56:30 +0000 |
|---|---|---|
| committer | Palmer Dabbelt <[email protected]> | 2025-07-16 16:05:26 +0000 |
| commit | 969f028bf2c40573ef18061f702ede3ebfe12b42 (patch) | |
| tree | 2a40b8b427dbbd20e4aaff3a8bbca3f0b40c9305 /rust/helpers/helpers.c | |
| parent | riscv: ftrace: Properly acquire text_mutex to fix a race condition (diff) | |
| download | kernel-969f028bf2c40573ef18061f702ede3ebfe12b42.tar.gz kernel-969f028bf2c40573ef18061f702ede3ebfe12b42.zip | |
riscv: Enable interrupt during exception handling
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: f0bddf50586d ("riscv: entry: Convert to generic entry")
Suggested-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Nam Cao <[email protected]>
Reviewed-by: Alexandre Ghiti <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions
