summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2014-02-17 13:36:35 +0000
committeravg <avg@FreeBSD.org>2014-02-17 13:36:35 +0000
commitad9d45d42725fe3fe3ece1c4b5d217d5fa7f3150 (patch)
tree1ae71ae4eabc23b04512fb64e0d870ae5b2d7e86
parent5add2c7be77fb298fb3c4810ef6c4c1dce046bf3 (diff)
downloadFreeBSD-src-ad9d45d42725fe3fe3ece1c4b5d217d5fa7f3150.zip
FreeBSD-src-ad9d45d42725fe3fe3ece1c4b5d217d5fa7f3150.tar.gz
MFC r260132: Allocate the probe ID unrhdr before the DTrace kld_* event
handlers are registered
-rw-r--r--sys/cddl/dev/dtrace/dtrace_load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cddl/dev/dtrace/dtrace_load.c b/sys/cddl/dev/dtrace/dtrace_load.c
index 5d59a04..e9cf9ae 100644
--- a/sys/cddl/dev/dtrace/dtrace_load.c
+++ b/sys/cddl/dev/dtrace/dtrace_load.c
@@ -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);
OpenPOWER on IntegriCloud