cvs commit: src/sys/i386/i386 sys_machdep.c vm_machdep.c

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Feb 28 10:32:36 PST 2006


dillon      2006/02/28 10:30:22 PST

DragonFly src repository

  Modified files:
    sys/i386/i386        sys_machdep.c vm_machdep.c 
  Log:
  Do not set the pcb_ext field until the private TSS has been completely
  initialized, otherwise an interrupt can come along and preempt, then
  attempt to restore using the incompletely initialized TSS.
  
  Do not free the pcb_ext data until after we have switched back to
  the common TSS, otherwise a blockage in kmem_free() may cause a
  premature thread switch with the now invalid private TSS.
  
  Do not depend on need_user_resched() to set a private TSS prior to returning
  from a system call, it may optimize itself into a NOP and not actually set
  the private TSS prior to our return to userland.  Instead, active the
  new private TSS manually by doing a forced thread switch to ourselves.
  
  Reported-by: Sascha Wildner <saw at xxxxxxxxx>
  
  Revision  Changes    Path
  1.22      +9 -4      src/sys/i386/i386/sys_machdep.c
  1.40      +9 -10     src/sys/i386/i386/vm_machdep.c


http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/sys_machdep.c.diff?r1=1.21&r2=1.22&f=u
http://www.dragonflybsd.org/cvsweb/src/sys/i386/i386/vm_machdep.c.diff?r1=1.39&r2=1.40&f=u





More information about the Commits mailing list