From owner-svn-src-head@FreeBSD.ORG Sun Aug 11 00:57:01 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A8FE64F0; Sun, 11 Aug 2013 00:57:01 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 95DFC28C2; Sun, 11 Aug 2013 00:57:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7B0v1cX067288; Sun, 11 Aug 2013 00:57:01 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7B0v1Ca067287; Sun, 11 Aug 2013 00:57:01 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201308110057.r7B0v1Ca067287@svn.freebsd.org> From: Rui Paulo Date: Sun, 11 Aug 2013 00:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254198 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Aug 2013 00:57:01 -0000 Author: rpaulo Date: Sun Aug 11 00:57:01 2013 New Revision: 254198 URL: http://svnweb.freebsd.org/changeset/base/254198 Log: fasttrap_fork(): unlock the processes before removing the tracepoints. In the future, we'll need to come up with new proc_*() functions that accept locked processes. For now, this prevents postgresql + DTrace from crashing the system. MFC after: 1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sat Aug 10 23:17:09 2013 (r254197) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Sun Aug 11 00:57:01 2013 (r254198) @@ -502,7 +502,13 @@ fasttrap_fork(proc_t *p, proc_t *cp) sprlock_proc(cp); mtx_unlock_spin(&cp->p_slock); #else + /* + * fasttrap_tracepoint_remove() expects the child process to be + * unlocked and the VM then expects curproc to be unlocked. + */ _PHOLD(cp); + PROC_UNLOCK(cp); + PROC_UNLOCK(p); #endif /* @@ -537,6 +543,8 @@ fasttrap_fork(proc_t *p, proc_t *cp) mutex_enter(&cp->p_lock); sprunlock(cp); #else + PROC_LOCK(p); + PROC_LOCK(cp); _PRELE(cp); #endif }