aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_hints.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-07-06 16:51:35 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-07-06 16:51:35 +0000
commitcae22dd9043efd39392d90c60416e512ce313c75 (patch)
treec0ced00cb96bd15d03e19c2692f0bc92201b66b2 /sys/kern/subr_hints.c
parent816957476832327cda631986ab68974e899fa52f (diff)
downloadsrc-cae22dd9043efd39392d90c60416e512ce313c75.tar.gz
src-cae22dd9043efd39392d90c60416e512ce313c75.zip
kern_environment: Fix SYSINIT ordering
The dynamic environment was being initialized at SI_SUB_KMEM, SI_ORDER_ANY. I added the hint-merging at SI_SUB_KMEM, SI_ORDER_ANY as well in r335998 - this can only work by coincidence. Re-do both to operate at SI_SUB_KMEM + 1, SI_ORDER_FIRST and SI_ORDER_SECOND respectively to be safe. It's sufficiently obfuscated away as to when in SU_SUB_KMEM malloc will be available, and the dynamic environment cannot be relied upon there anyways since it's initialized at SI_ORDER_ANY. Reported by: bde Discussed with: bde X-MFC-With: r335998
Notes
Notes: svn path=/head/; revision=336036
Diffstat (limited to 'sys/kern/subr_hints.c')
-rw-r--r--sys/kern/subr_hints.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c
index c9d9af1324d4..b44020173d9b 100644
--- a/sys/kern/subr_hints.c
+++ b/sys/kern/subr_hints.c
@@ -88,7 +88,7 @@ static_hints_to_env(void *data __unused)
}
/* Any time after dynamic env is setup */
-SYSINIT(hintenv, SI_SUB_KMEM, SI_ORDER_ANY, static_hints_to_env, NULL);
+SYSINIT(hintenv, SI_SUB_KMEM + 1, SI_ORDER_SECOND, static_hints_to_env, NULL);
/*
* Checks the environment to see if we even have any hints. If it has no hints,