Date: Sun, 7 Jun 2015 20:10:11 +0000 (UTC) From: Mark Johnston <markj@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: r284134 - stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace Message-ID: <201506072010.t57KABI2073467@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sun Jun 7 20:10:11 2015 New Revision: 284134 URL: https://svnweb.freebsd.org/changeset/base/284134 Log: MFC r278136, r278137, r278370: Diff reduction with illumos, in preparation for merging r266993 from the vendor branch. No functional change. 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 Jun 7 19:59:01 2015 (r284133) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sun Jun 7 20:10:11 2015 (r284134) @@ -14178,7 +14178,7 @@ dtrace_state_create(struct cdev *dev) if (dev != NULL) { cr = dev->si_cred; m = dev2unit(dev); - } + } /* Allocate memory for the state. */ state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP); @@ -16845,23 +16845,29 @@ dtrace_dtr(void *data) mutex_enter(&cpu_lock); mutex_enter(&dtrace_lock); - if (state != NULL) { - if (state->dts_anon) { - /* - * There is anonymous state. Destroy that first. - */ - ASSERT(dtrace_anon.dta_state == NULL); - dtrace_state_destroy(state->dts_anon); - } +#ifdef illumos + if (state->dts_anon) +#else + if (state != NULL && state->dts_anon) +#endif + { + /* + * There is anonymous state. Destroy that first. + */ + ASSERT(dtrace_anon.dta_state == NULL); + dtrace_state_destroy(state->dts_anon); + } +#ifdef illumos + dtrace_state_destroy(state); +#else + if (state != NULL) { dtrace_state_destroy(state); - -#if !defined(sun) kmem_free(state, 0); -#endif } - +#endif ASSERT(dtrace_opens > 0); + #if defined(sun) /* * Only relinquish control of the kernel debugger interface when there
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506072010.t57KABI2073467>