From 2231410363d1ff97f0b22556cc656ad5880db5cf Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 21 Aug 2025 03:47:50 -0400 Subject: kernel/amd64: trap: Remove erroneous spl calls The trap_handler() function is a very sensitive code path and thus calling things like splraise(), splx(), etc is quite unsafe and also somewhat not needed. This commit removes those calls from the trap_handler() function. Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/trap.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys') diff --git a/sys/arch/amd64/amd64/trap.c b/sys/arch/amd64/amd64/trap.c index 37efad4..589774b 100644 --- a/sys/arch/amd64/amd64/trap.c +++ b/sys/arch/amd64/amd64/trap.c @@ -181,9 +181,6 @@ trap_syscall(struct trapframe *tf) void trap_handler(struct trapframe *tf) { - int ipl; - - ipl = splraise(IPL_HIGH); if (tf->trapno >= NELEM(trap_type)) { panic("got unknown trap %d\n", tf->trapno); } @@ -192,7 +189,6 @@ trap_handler(struct trapframe *tf) /* Handle traps from userland */ if (ISSET(tf->cs, 3)) { - splx(ipl); trap_user(tf); return; } -- cgit v1.2.3