From owner-svn-src-all@freebsd.org Fri Sep 11 03:06:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4570A027B3; Fri, 11 Sep 2015 03:06:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4F991042; Fri, 11 Sep 2015 03:06:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t8B36Zsp061042; Fri, 11 Sep 2015 03:06:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t8B36ZTw061041; Fri, 11 Sep 2015 03:06:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201509110306.t8B36ZTw061041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 11 Sep 2015 03:06:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287642 - 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2015 03:06:35 -0000 Author: markj Date: Fri Sep 11 03:06:34 2015 New Revision: 287642 URL: https://svnweb.freebsd.org/changeset/base/287642 Log: MFV r283513: 5930 fasttrap_pid_enable() panics when prfind() fails in forking process Reviewed by: Adam Leventhal Reviewed by: Gordon Ross Approved by: Richard Lowe Author: Bryan Cantrill illumos/illumos-gate@9df7e4e12eb093557252d3bec029b5c382613e36 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Sep 11 03:04:24 2015 (r287641) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Sep 11 03:06:34 2015 (r287642) @@ -29,7 +29,7 @@ */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. All rights reserved. */ #include @@ -1190,11 +1190,21 @@ fasttrap_pid_enable(void *arg, dtrace_id mutex_enter(&pidlock); p = prfind(probe->ftp_pid); + if (p == NULL) { + /* + * So it's not that the target process is being born, + * it's that it isn't there at all (and we simply + * happen to be forking). Anyway, we know that the + * target is definitely gone, so bail out. + */ + mutex_exit(&pidlock); + return (0); + } + /* * Confirm that curproc is indeed forking the process in which * we're trying to enable probes. */ - ASSERT(p != NULL); ASSERT(p->p_parent == curproc); ASSERT(p->p_stat == SIDL);