Date: Mon, 25 May 2015 02:32:30 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r283513 - vendor-sys/illumos/dist/uts/common/dtrace Message-ID: <201505250232.t4P2WUPO006955@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon May 25 02:32:30 2015 New Revision: 283513 URL: https://svnweb.freebsd.org/changeset/base/283513 Log: 5930 fasttrap_pid_enable() panics when prfind() fails in forking process Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Gordon Ross <gordon.ross@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Bryan Cantrill <bryan@joyent.com> illumos/illumos-gate@9df7e4e12eb093557252d3bec029b5c382613e36 Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Modified: vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Mon May 25 02:30:54 2015 (r283512) +++ vendor-sys/illumos/dist/uts/common/dtrace/fasttrap.c Mon May 25 02:32:30 2015 (r283513) @@ -25,7 +25,7 @@ */ /* - * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. All rights reserved. */ #include <sys/atomic.h> @@ -928,11 +928,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505250232.t4P2WUPO006955>