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.
This commit is contained in:
dfr 2001-03-04 23:29:23 +00:00
parent 6d34e037b2
commit 430eceb8a5

View File

@ -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
}