DragonFly BSD
DragonFly commits List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cvs commit: src/sys/i386/i386 bcopy.s


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 29 Apr 2004 19:59:14 -0700 (PDT)

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]