From 059fede30f4b2c32e91a46fd45ededb17469f62e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 29 Jun 2025 03:26:52 -0400 Subject: kernel/amd64: trap: Restore IPL during user traps Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/trap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch') 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; } -- cgit v1.2.3