cvs commit: src/sys/kern uipc_usrreq.c

Robert Watson rwatson at FreeBSD.org
Thu May 10 20:00:37 UTC 2007


rwatson     2007-05-10 20:00:36 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/kern             uipc_usrreq.c 
  Log:
  Merge uipc_usrreq.c:1.193 from HEAD to RELENG_6:
  
    Change unp_mtx to supporting recursion, and do not drop the unp_mtx over
    sonewconn() in unp_connect().  This avoids a race that occurs due to
    v_socket being an uncounted reference, as the lock was being released in
    order to call sonewconn(), which otherwise recurses into the UNIX domain
    socket code via pru_attach, as well as holding the lock over a sleeping
    memory allocation in uipc_attach().  Switch to a non-sleeping memory
    allocation during UNIX domain socket attach.
  
    This fix non-ideal in that it requires enabling recursion, but is a much
    smaller change than moving to using true references for v_socket.  The
    reported panic occurs in unp_connect() following the return of
    sonewconn().
  
    Update copyright year.
  
    Panic reported by:      jhb
  
  Tested by:      jhb
  
  Revision    Changes    Path
  1.155.2.22  +5 -13     src/sys/kern/uipc_usrreq.c


More information about the cvs-src mailing list