Index: sys/kern/init_main.c =================================================================== RCS file: /cvsroot/src/sys/kern/init_main.c,v retrieving revision 1.458.2.2 diff -u -p -r1.458.2.2 init_main.c --- sys/kern/init_main.c 9 Mar 2015 08:56:01 -0000 1.458.2.2 +++ sys/kern/init_main.c 14 Dec 2015 11:47:37 -0000 @@ -812,6 +812,9 @@ configure2(void) /* Get the threads going and into any sleeps before continuing. */ yield(); + + /* Lock the kernel on behalf of lwp0. */ + KERNEL_LOCK(1, NULL); } static void Index: sys/kern/subr_autoconf.c =================================================================== RCS file: /cvsroot/src/sys/kern/subr_autoconf.c,v retrieving revision 1.231.2.2 diff -u -p -r1.231.2.2 subr_autoconf.c --- sys/kern/subr_autoconf.c 16 Nov 2015 14:40:41 -0000 1.231.2.2 +++ sys/kern/subr_autoconf.c 14 Dec 2015 11:47:38 -0000 @@ -2126,8 +2126,6 @@ config_finalize(void) cv_wait(&config_misc_cv, &config_misc_lock); mutex_exit(&config_misc_lock); - KERNEL_LOCK(1, NULL); - /* Attach pseudo-devices. */ for (pdev = pdevinit; pdev->pdev_attach != NULL; pdev++) (*pdev->pdev_attach)(pdev->pdev_count); @@ -2147,8 +2145,6 @@ config_finalize(void) kmem_free(f, sizeof(*f)); } - KERNEL_UNLOCK_ONE(NULL); - errcnt = aprint_get_error_count(); if ((boothowto & (AB_QUIET|AB_SILENT)) != 0 && (boothowto & AB_VERBOSE) == 0) {