summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-16 00:45:45 -0400
committerIan Moffett <ian@osmora.org>2024-05-16 00:45:45 -0400
commit406d49ec0346e4c8a55109fd698e8364f16cfada (patch)
tree7bcbf8f8b0c2d6c11ddd585b71f98172318f57d5
parent4d82697cc521c42cfd51bf8d617802c698ce5e31 (diff)
kernel: panic: Call intr_mask() first
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/kern/kern_panic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_panic.c b/sys/kern/kern_panic.c
index aec7be3..8b5fbb1 100644
--- a/sys/kern/kern_panic.c
+++ b/sys/kern/kern_panic.c
@@ -48,6 +48,7 @@ panic(const char *fmt, ...)
va_list ap;
static struct spinlock lock = {0};
+ intr_mask();
spinlock_acquire(&lock); /* Never released */
__TRY_CALL(cpu_halt_others);