git: dfbda7c53d67 - stable/14 - riscv: Fix handling of interrupts during kernel page faults
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Apr 2025 00:47:54 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=dfbda7c53d673999aeb743f77c30c157c067dd8b
commit dfbda7c53d673999aeb743f77c30c157c067dd8b
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-04-19 22:41:07 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-04-29 00:44:01 +0000
riscv: Fix handling of interrupts during kernel page faults
We were checking the wrong status bit when deciding whether to enable
interrupts.
Reviewed by: jrtc27
Fixes: c226f193515c ("riscv: Permit spurious faults in kernel mode")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D49897
(cherry picked from commit 0ca5e3dd1ad006a5251a391676e90ec4dc94df20)
---
sys/riscv/riscv/trap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c
index 0b6db7982847..2e502316447d 100644
--- a/sys/riscv/riscv/trap.c
+++ b/sys/riscv/riscv/trap.c
@@ -241,7 +241,7 @@ page_fault_handler(struct trapframe *frame, int usermode)
* Enable interrupts for the duration of the page fault. For
* user faults this was done already in do_trap_user().
*/
- if ((frame->tf_sstatus & SSTATUS_SIE) != 0)
+ if ((frame->tf_sstatus & SSTATUS_SPIE) != 0)
intr_enable();
if (stval >= VM_MIN_KERNEL_ADDRESS) {