Module Name:    src
Committed By:   riastradh
Date:           Sun Aug  7 21:17:18 UTC 2022

Modified Files:
        src/sys/kern: kern_module.c

Log Message:
module(9): Disable module autounload by default.

I don't know why this was ever enabled by default; many modules are
still not safe to unload, let alone autounload.  If any autounload is
to happen by default, it should only be for modules that have opted
into it in some way after audit.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/kern/kern_module.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/kern_module.c
diff -u src/sys/kern/kern_module.c:1.155 src/sys/kern/kern_module.c:1.156
--- src/sys/kern/kern_module.c:1.155	Sun Aug  7 20:44:39 2022
+++ src/sys/kern/kern_module.c	Sun Aug  7 21:17:18 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_module.c,v 1.155 2022/08/07 20:44:39 riastradh Exp $	*/
+/*	$NetBSD: kern_module.c,v 1.156 2022/08/07 21:17:18 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.155 2022/08/07 20:44:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.156 2022/08/07 21:17:18 riastradh Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -96,7 +96,7 @@ bool		module_autoload_on = false;
 #endif
 u_int		module_count;
 u_int		module_builtinlist;
-u_int		module_autotime = 10;
+u_int		module_autotime = 0;
 u_int		module_gen = 1;
 static kcondvar_t module_thread_cv;
 static kmutex_t module_thread_lock;

Reply via email to