Date: Tue, 1 Jul 2014 22:16:45 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268125 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <201407012216.s61MGjgd034652@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Tue Jul 1 22:16:44 2014 New Revision: 268125 URL: http://svnweb.freebsd.org/changeset/base/268125 Log: 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 MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Jul 1 21:57:15 2014 (r268124) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Tue Jul 1 22:16:44 2014 (r268125) @@ -12615,7 +12615,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); } @@ -16678,7 +16679,8 @@ dtrace_open(struct cdev *dev, int oflags * 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; cred_p = dev->si_cred;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407012216.s61MGjgd034652>