From 768a854cad81be5f2dfadbfe508fd5f5da932408 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 4 Mar 2001 23:29:23 +0000 Subject: [PATCH] Disable interrupts while sanity checking the owner of the floating point state. It is possible that we could be preempted part way through the check. --- sys/alpha/alpha/machdep.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 0b79c685bb2..7238cd1f3a0 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -2100,9 +2100,14 @@ alpha_fpstate_check(struct proc *p) * For SMP, we should check the fpcurproc of each cpu. */ #ifndef SMP + int s; + + s = save_intr(); + disable_intr(); if (p->p_addr->u_pcb.pcb_hw.apcb_flags & ALPHA_PCB_FLAGS_FEN) if (p != PCPU_GET(fpcurproc)) panic("alpha_check_fpcurproc: bogus"); + restore_intr(s); #endif }