From owner-cvs-all@FreeBSD.ORG Thu May 10 20:00:37 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E8EE16A402; Thu, 10 May 2007 20:00:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 3C63713C448; Thu, 10 May 2007 20:00:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4AK0bMU081651; Thu, 10 May 2007 20:00:37 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4AK0aHa081647; Thu, 10 May 2007 20:00:36 GMT (envelope-from rwatson) Message-Id: <200705102000.l4AK0aHa081647@repoman.freebsd.org> From: Robert Watson Date: Thu, 10 May 2007 20:00:36 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/kern uipc_usrreq.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 20:00:37 -0000 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