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.
This commit is contained in:
parent
c5c4ac3fb8
commit
c2b095ab72
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user