Module Name: src Committed By: martin Date: Sun Jan 3 12:51:33 UTC 2021
Modified Files: src/sys/kern [netbsd-9]: init_main.c Log Message: Apply patch, requested by khorben in ticket #1177 (issue solved differently in -current): sys/kern/init_main.c (apply patch) PR kern/55906: create the aiodone workqueue before running mountroothooks. To generate a diff of this commit: cvs rdiff -u -r1.504.2.1 -r1.504.2.2 src/sys/kern/init_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.504.2.1 src/sys/kern/init_main.c:1.504.2.2 --- src/sys/kern/init_main.c:1.504.2.1 Sat Nov 14 15:36:11 2020 +++ src/sys/kern/init_main.c Sun Jan 3 12:51:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.504.2.1 2020/11/14 15:36:11 martin Exp $ */ +/* $NetBSD: init_main.c,v 1.504.2.2 2021/01/03 12:51:33 martin Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.504.2.1 2020/11/14 15:36:11 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.504.2.2 2021/01/03 12:51:33 martin Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -668,6 +668,11 @@ main(void) cpu_rootconf(); cpu_dumpconf(); + /* Create the aiodone daemon kernel thread. */ + if (workqueue_create(&uvm.aiodone_queue, "aiodoned", + uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE)) + panic("fork aiodoned"); + /* Mount the root file system. */ do { domountroothook(root_device); @@ -736,11 +741,6 @@ main(void) NULL, NULL, "ioflush")) panic("fork syncer"); - /* Create the aiodone daemon kernel thread. */ - if (workqueue_create(&uvm.aiodone_queue, "aiodoned", - uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE)) - panic("fork aiodoned"); - /* Wait for final configure threads to complete. */ config_finalize_mountroot();