Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern module(9): Disable module autounload by default.



details:   https://anonhg.NetBSD.org/src/rev/9d57ea8c553f
branches:  trunk
changeset: 368843:9d57ea8c553f
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Aug 07 21:17:18 2022 +0000

description:
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.

diffstat:

 sys/kern/kern_module.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5cd4e91c2fee -r 9d57ea8c553f sys/kern/kern_module.c
--- a/sys/kern/kern_module.c    Sun Aug 07 20:47:05 2022 +0000
+++ b/sys/kern/kern_module.c    Sun Aug 07 21:17:18 2022 +0000
@@ -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 @@
 #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;



Home | Main Index | Thread Index | Old Index