Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Feb 2007 12:22:11 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern uipc_usrreq.c
Message-ID:  <200702141222.l1ECMBXF027072@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2007-02-14 12:22:11 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_usrreq.c 
  Log:
  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
  
  Revision  Changes    Path
  1.193     +5 -13     src/sys/kern/uipc_usrreq.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702141222.l1ECMBXF027072>