From 259089eefc8d33749e9d627d9d46d24a3dd295fc Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 20 May 2001 17:01:20 +0000 Subject: Use a critical region to protect pushing of curproc's npx state to curpcb in vm86_bioscall(). I don't know if the state is ever in the npx at that point. --- sys/i386/i386/vm86bios.s | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/i386/i386/vm86bios.s b/sys/i386/i386/vm86bios.s index e5522bc09c05..e12ac41d3560 100644 --- a/sys/i386/i386/vm86bios.s +++ b/sys/i386/i386/vm86bios.s @@ -65,6 +65,8 @@ ENTRY(vm86_bioscall) pushl %gs #ifdef DEV_NPX + pushfl + cli movl PCPU(CURPROC),%ecx cmpl %ecx,PCPU(NPXPROC) /* do we need to save fp? */ jne 1f @@ -77,9 +79,10 @@ ENTRY(vm86_bioscall) call npxsave popl %ecx popl %edx /* recover our pcb */ +1: + popfl #endif -1: movl SCR_VMFRAME(%edx),%ebx /* target frame location */ movl %ebx,%edi /* destination */ movl SCR_ARGFRAME(%edx),%esi /* source (set on entry) */ -- cgit v1.3