svn commit: r268125 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace

Pedro F. Giffuni pfg at FreeBSD.org
Tue Jul 1 22:16:45 UTC 2014


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;


More information about the svn-src-head mailing list