diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c index a2d4102d917c75..d5f0873fa40efc 100644 --- a/sys/kern/kern_environment.c +++ b/sys/kern/kern_environment.c @@ -346,7 +346,7 @@ init_dynamic_kenv(void *data __unused) mtx_init(&kenv_lock, "kernel environment", NULL, MTX_DEF); dynamic_kenv = 1; } -SYSINIT(kenv, SI_SUB_KMEM, SI_ORDER_ANY, init_dynamic_kenv, NULL); +SYSINIT(kenv, SI_SUB_KMEM + 1, SI_ORDER_FIRST, init_dynamic_kenv, NULL); void freeenv(char *env) diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c index c9d9af1324d4c2..b44020173d9b54 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,