diff options
author | bde <bde@FreeBSD.org> | 2001-05-20 16:51:08 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2001-05-20 16:51:08 +0000 |
commit | 20d39ffc04278fc10ff2ca16a7de8f2ad3597130 (patch) | |
tree | 3f5d991cdb3924eace11ec523000195ab169e2f8 /sys/i386 | |
parent | f07e923e1b1275aadabaf2cf31e22d9a36864feb (diff) | |
download | FreeBSD-src-20d39ffc04278fc10ff2ca16a7de8f2ad3597130.zip FreeBSD-src-20d39ffc04278fc10ff2ca16a7de8f2ad3597130.tar.gz |
Use a critical region to protect saving of the npx state in savectx().
Not doing this was fairly harmless because savectx() is only called
for panic dumps and the bug could at worse reset the state.
savectx() is still missing saving of (volatile) debug registers, and
still isn't called for core dumps.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/swtch.s | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index ed4525f..180b87b 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -327,6 +327,8 @@ ENTRY(savectx) * have to handle h/w bugs for reloading. We used to lose the * parent's npx state for forks by forgetting to reload. */ + pushfl + cli movl PCPU(NPXPROC),%eax testl %eax,%eax je 1f @@ -347,7 +349,8 @@ ENTRY(savectx) pushl %eax call bcopy addl $12,%esp +1: + popfl #endif /* DEV_NPX */ -1: ret |