diff options
Diffstat (limited to 'sys/kern/init_main.c')
-rw-r--r-- | sys/kern/init_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 96ebf36..97b7f0f 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -454,7 +454,10 @@ proc0_init(void *dummy __unused) p->p_ucred->cr_ruidinfo = uifind(0); p->p_ucred->cr_prison = NULL; /* Don't jail it. */ #ifdef VIMAGE - p->p_ucred->cr_vnet = LIST_FIRST(&vnet_head); + KASSERT(LIST_FIRST(&vimage_head) != NULL, ("vimage_head empty")); + P_TO_VIMAGE(p) = LIST_FIRST(&vimage_head); /* set ucred->cr_vimage */ + refcount_acquire(&P_TO_VIMAGE(p)->vi_ucredrefc); + LIST_FIRST(&vprocg_head)->nprocs++; #endif #ifdef AUDIT audit_cred_kproc0(p->p_ucred); |