cvs commit: src/sys/kern sys_pipe.c

Brian Feldman green at FreeBSD.org
Sun Feb 22 15:00:15 PST 2004


green       2004/02/22 15:00:14 PST

  FreeBSD src repository

  Modified files:
    sys/kern             sys_pipe.c 
  Log:
  Correct some major SMP-harmful problems in the pipe implementation.  First
  of all, PIPE_EOF is not checked pervasively after everything that can drop
  the pipe mutex and msleep(), so fix.  Additionally, though it might not
  harm anything, pipelock() and pipeunlock() are not used consistently.
  Third, the kqueue support functions do not use the pipe mutex correctly.
  Last, but absolutely not least, is a race: if pipe_busy is not set on
  the closing side of the pipe, the other side that is trying to write to
  that will crash BECAUSE PIPE_EOF IS NOT SET!  Unconditionally set
  PIPE_EOF, and get rid of all the lockups/crashes I have seen trying
  to build ports.
  
  Revision  Changes    Path
  1.168     +66 -41    src/sys/kern/sys_pipe.c


More information about the cvs-src mailing list