cvs commit: src/sys/i386/i386 bcopy.s
Matthew Dillon
dillon at crater.dragonflybsd.org
Thu Apr 29 19:59:41 PDT 2004
dillon 2004/04/29 19:59:14 PDT
DragonFly src repository
Modified files:
sys/i386/i386 bcopy.s
Log:
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
away.
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
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/bcopy.s.diff?r1=1.2&r2=1.3&f=h
More information about the Commits
mailing list