DragonFly commits List (threaded) for 2004-04
cvs commit: src/sys/i386/i386 bcopy.s
dillon 2004/04/29 19:59:14 PDT
DragonFly src repository
Fix a race in the FP copy code. If we setup our temporary FP save area
before we check npxthread it is possible for a one-instruction-window
interrupt to come along and save the application FP state to our temporary
area and then clear npxthread, causing the application FP state to be thrown
Also, if there is no app FP state (npxthread is NULL), it is possible
once we set npxthread=curthread for an interrupt to come along and save
bogus FP state to our temporary save area before we have a chance to
fninit (one instruction window since we clts just prior to the fninit),
causing the fninit to fault and npxdna to restore the bogus state.
Use a critical section to prevent these cases from occuring.
Revision Changes Path
1.3 +23 -2 src/sys/i386/i386/bcopy.s