diff options
author | pfg <pfg@FreeBSD.org> | 2014-07-06 17:18:48 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-07-06 17:18:48 +0000 |
commit | cb7d3f9cb77918d32e9a9bd3ec89b859231ad5a2 (patch) | |
tree | 9b6d0623e64819e407c39272e4ddb5bb151320ec /sys/cddl/contrib | |
parent | 08d1f25e3324fae6172868141f62304fcbce4797 (diff) | |
download | FreeBSD-src-cb7d3f9cb77918d32e9a9bd3ec89b859231ad5a2.zip FreeBSD-src-cb7d3f9cb77918d32e9a9bd3ec89b859231ad5a2.tar.gz |
MFC r268125:
Small merges from OpenSolaris:
These have no effect on FreeBSD, in fact they are ifdef'ed,
but make easier future merges:
6699767 panic in spec_open()
6718877 crgetzoneid() use can cause problems when forking processes with
USDT providers in a non global zone
Diffstat (limited to 'sys/cddl/contrib')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index feebabc..95845f5 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -11689,7 +11689,8 @@ dtrace_enabling_matchall(void) #if defined(sun) cred_t *cr = enab->dten_vstate->dtvs_state->dts_cred.dcr_cred; - if (INGLOBALZONE(curproc) || getzoneid() == crgetzoneid(cr)) + if (INGLOBALZONE(curproc) || + cr != NULL && getzoneid() == crgetzoneid(cr)) #endif (void) dtrace_enabling_match(enab, NULL); } @@ -15697,7 +15698,8 @@ dtrace_open(struct cdev *dev, int oflags, int devtype, struct thread *td) * If this wasn't an open with the "helper" minor, then it must be * the "dtrace" minor. */ - ASSERT(getminor(*devp) == DTRACEMNRN_DTRACE); + if (getminor(*devp) == DTRACEMNRN_DTRACE) + return (ENXIO); #else cred_t *cred_p = NULL; |