summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-29 03:26:52 -0400
committerIan Moffett <ian@osmora.org>2025-06-29 03:26:52 -0400
commit059fede30f4b2c32e91a46fd45ededb17469f62e (patch)
tree6237e4535bb27af4b92cad6e5cace1d5fc0145d7 /sys/arch/amd64
parent66ec8765f305c7a5318d38a383e23b1280cd9186 (diff)
kernel/amd64: trap: Restore IPL during user traps
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/trap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c
index 84a6a77..5b26334 100644
--- a/sys/arch/amd64/amd64/trap.c
+++ b/sys/arch/amd64/amd64/trap.c
@@ -176,8 +176,9 @@ trap_syscall(struct trapframe *tf)
void
trap_handler(struct trapframe *tf)
{
- splraise(IPL_HIGH);
+ int ipl;
+ ipl = splraise(IPL_HIGH);
if (tf->trapno >= NELEM(trap_type)) {
panic("got unknown trap %d\n", tf->trapno);
}
@@ -186,6 +187,7 @@ trap_handler(struct trapframe *tf)
/* Handle traps from userland */
if (ISSET(tf->cs, 3)) {
+ splx(ipl);
trap_user(tf);
return;
}