dtrace.c (266667) | dtrace.c (268323) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 4 unchanged lines hidden (view full) --- 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 * |
21 * $FreeBSD: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c 266667 2014-05-25 18:19:57Z markj $ | 21 * $FreeBSD: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c 268323 2014-07-06 17:18:48Z pfg $ |
22 */ 23 24/* 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26 * Copyright (c) 2013, Joyent, Inc. All rights reserved. 27 * Copyright (c) 2012 by Delphix. All rights reserved. 28 */ 29 --- 11654 unchanged lines hidden (view full) --- 11684 * are retained enablings. We can safely load from dtrace_retained, 11685 * however: the taskq_destroy() at the end of dtrace_detach() will 11686 * block pending our completion. 11687 */ 11688 for (enab = dtrace_retained; enab != NULL; enab = enab->dten_next) { 11689#if defined(sun) 11690 cred_t *cr = enab->dten_vstate->dtvs_state->dts_cred.dcr_cred; 11691 | 22 */ 23 24/* 25 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 26 * Copyright (c) 2013, Joyent, Inc. All rights reserved. 27 * Copyright (c) 2012 by Delphix. All rights reserved. 28 */ 29 --- 11654 unchanged lines hidden (view full) --- 11684 * are retained enablings. We can safely load from dtrace_retained, 11685 * however: the taskq_destroy() at the end of dtrace_detach() will 11686 * block pending our completion. 11687 */ 11688 for (enab = dtrace_retained; enab != NULL; enab = enab->dten_next) { 11689#if defined(sun) 11690 cred_t *cr = enab->dten_vstate->dtvs_state->dts_cred.dcr_cred; 11691 |
11692 if (INGLOBALZONE(curproc) || getzoneid() == crgetzoneid(cr)) | 11692 if (INGLOBALZONE(curproc) || 11693 cr != NULL && getzoneid() == crgetzoneid(cr)) |
11693#endif 11694 (void) dtrace_enabling_match(enab, NULL); 11695 } 11696 11697 mutex_exit(&dtrace_lock); 11698 mutex_exit(&cpu_lock); 11699} 11700 --- 3991 unchanged lines hidden (view full) --- 15692#if defined(sun) 15693 if (getminor(*devp) == DTRACEMNRN_HELPER) 15694 return (0); 15695 15696 /* 15697 * If this wasn't an open with the "helper" minor, then it must be 15698 * the "dtrace" minor. 15699 */ | 11694#endif 11695 (void) dtrace_enabling_match(enab, NULL); 11696 } 11697 11698 mutex_exit(&dtrace_lock); 11699 mutex_exit(&cpu_lock); 11700} 11701 --- 3991 unchanged lines hidden (view full) --- 15693#if defined(sun) 15694 if (getminor(*devp) == DTRACEMNRN_HELPER) 15695 return (0); 15696 15697 /* 15698 * If this wasn't an open with the "helper" minor, then it must be 15699 * the "dtrace" minor. 15700 */ |
15700 ASSERT(getminor(*devp) == DTRACEMNRN_DTRACE); | 15701 if (getminor(*devp) == DTRACEMNRN_DTRACE) 15702 return (ENXIO); |
15701#else 15702 cred_t *cred_p = NULL; 15703 15704#if __FreeBSD_version < 800039 15705 /* 15706 * The first minor device is the one that is cloned so there is 15707 * nothing more to do here. 15708 */ --- 1249 unchanged lines hidden --- | 15703#else 15704 cred_t *cred_p = NULL; 15705 15706#if __FreeBSD_version < 800039 15707 /* 15708 * The first minor device is the one that is cloned so there is 15709 * nothing more to do here. 15710 */ --- 1249 unchanged lines hidden --- |