Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2014 17:18:48 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r268323 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace
Message-ID:  <201407061718.s66HImHi009103@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pfg
Date: Sun Jul  6 17:18:48 2014
New Revision: 268323
URL: http://svnweb.freebsd.org/changeset/base/268323

Log:
  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

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Sun Jul  6 16:42:04 2014	(r268322)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c	Sun Jul  6 17:18:48 2014	(r268323)
@@ -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
 	 * 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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407061718.s66HImHi009103>