svn commit: r260132 - head/sys/cddl/dev/dtrace
Mark Johnston
markj at FreeBSD.org
Tue Dec 31 15:41:16 UTC 2013
Author: markj
Date: Tue Dec 31 15:41:16 2013
New Revision: 260132
URL: http://svnweb.freebsd.org/changeset/base/260132
Log:
Allocate the probe ID unrhdr before the DTrace kld_* event handlers are
registered. Otherwise there is a small window during which probe IDs may be
allocated before the unrhdr is allocated.
MFC after: 2 weeks
Modified:
head/sys/cddl/dev/dtrace/dtrace_load.c
Modified: head/sys/cddl/dev/dtrace/dtrace_load.c
==============================================================================
--- head/sys/cddl/dev/dtrace/dtrace_load.c Tue Dec 31 15:37:51 2013 (r260131)
+++ head/sys/cddl/dev/dtrace/dtrace_load.c Tue Dec 31 15:41:16 2013 (r260132)
@@ -58,6 +58,8 @@ dtrace_load(void *dummy)
dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, 0, 0, 0);
+ dtrace_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx);
+
/* Register callbacks for linker file load and unload events. */
dtrace_kld_load_tag = EVENTHANDLER_REGISTER(kld_load,
dtrace_kld_load, NULL, EVENTHANDLER_PRI_ANY);
@@ -85,8 +87,6 @@ dtrace_load(void *dummy)
ASSERT(MUTEX_HELD(&cpu_lock));
- dtrace_arena = new_unrhdr(1, INT_MAX, &dtrace_unr_mtx);
-
dtrace_state_cache = kmem_cache_create("dtrace_state_cache",
sizeof (dtrace_dstate_percpu_t) * NCPU, DTRACE_STATE_ALIGN,
NULL, NULL, NULL, NULL, NULL, 0);
More information about the svn-src-head
mailing list