cvs commit: src/sys/sys proc.h

John Baldwin jhb at FreeBSD.org
Tue Feb 28 12:11:32 PST 2006


jhb         2006-02-28 20:11:30 UTC

  FreeBSD src repository

  Modified files:
    sys/sys              proc.h 
  Log:
  Allow PHOLD()'s of curproc even if P_WEXIT is set.  Normally we don't want
  to allow PHOLD()'s of processes that have P_WEXIT set as once that flag
  is set we aren't guaranteed to block in exit1() waiting for the PRELE()
  (we might already be past the wait).  However, curproc is a bit of a
  special case.  By the time P_WEXIT is set, the process is single-threaded,
  so the only thread for which can do a PHOLD(curproc) is the thread
  executing in exit1().  The fact that this thread is executing ensures
  that the process won't go away before the current hold is released via
  PRELE().  This fixes some panics due to kicking off softupdate operations
  inside of exit1() after the recent PHOLD changes to fix ptrace/procfs vs
  exit races.
  
  MFC after:      1 week
  Tested by:      pho
  
  Revision  Changes    Path
  1.455     +2 -1      src/sys/sys/proc.h


More information about the cvs-all mailing list