cvs commit: src/sys/kern uipc_syscalls.c

Robert Watson rwatson at FreeBSD.org
Sat May 10 17:21:26 UTC 2008


rwatson     2008-05-10 17:21:20 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_7)
    sys/kern             uipc_syscalls.c 
  Log:
  Merge uipc_syscalls.c:1.271 from HEAD to RELENG_7:
  
    When writing trailers in sendfile(2), don't call kern_writev()
    while holding the socket buffer lock.  These leads to an
    immediate panic due to recursing the socket buffer lock.  This
    bug was introduced in uipc_syscalls.c:1.240, but masked by
    another bug until that was fixed in uipc_syscalls.c:1.269.
  
    Note that the current fix isn't perfect, but better than
    panicking: normally we guarantee that simultaneous invocations
    of a system call to write on a stream socket won't be
    interlaced, which is ensured by use of the socket buffer sleep
    lock.  This is guaranteed for the sendfile headers, but not
    trailers.  In practice, this is likely not a problem, but
    should be fixed.
  
    Pointy hat to:  andre (1.240), cperciva (1.269)
  
  Revision   Changes    Path
  1.259.2.4  +4 -3      src/sys/kern/uipc_syscalls.c


More information about the cvs-src mailing list