diff options
author | Bryan Cantrill <bryan@joyent.com> | 2015-05-14 07:42:24 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2015-05-14 07:42:24 +0000 |
commit | e5e29fcc07599538d8563d37752145d2e40dc6cd (patch) | |
tree | 03b01648fbd3e6b9bf4e6a844462053ed682f5e6 /usr/src | |
parent | 94d42d9bc2170e6765e1ce243f5bf0d341bfec90 (diff) | |
download | illumos-joyent-release-20150514.tar.gz |
OS-4298 fasttrap_pid_enable() panics when prfind() fails in forking process20150514release-20150514
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/common/dtrace/fasttrap.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/uts/common/dtrace/fasttrap.c b/usr/src/uts/common/dtrace/fasttrap.c index fc3d87574a..2dc2620535 100644 --- a/usr/src/uts/common/dtrace/fasttrap.c +++ b/usr/src/uts/common/dtrace/fasttrap.c @@ -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,6 +928,17 @@ fasttrap_pid_enable(void *arg, dtrace_id_t id, void *parg) 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. |