Module Name: src Committed By: martin Date: Fri Aug 4 13:58:11 UTC 2023
Modified Files: src/sys/kern [netbsd-8]: init_main.c Log Message: Apply patch, requested by riastradh in ticket #1882 (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.490.6.2 -r1.490.6.3 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.490.6.2 src/sys/kern/init_main.c:1.490.6.3 --- src/sys/kern/init_main.c:1.490.6.2 Sat Feb 6 15:22:19 2021 +++ src/sys/kern/init_main.c Fri Aug 4 13:58:11 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.490.6.2 2021/02/06 15:22:19 martin Exp $ */ +/* $NetBSD: init_main.c,v 1.490.6.3 2023/08/04 13:58:11 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.490.6.2 2021/02/06 15:22:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.490.6.3 2023/08/04 13:58:11 martin Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -638,6 +638,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); @@ -697,11 +702,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();