git: 11f1dd193af5 - main - init_main: Fix logging the subsystem of pre-loaded kernel modules
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Sep 2025 10:15:21 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=11f1dd193af57dfa5128eadc62b084502292a784
commit 11f1dd193af57dfa5128eadc62b084502292a784
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-03 10:14:21 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-09-03 10:14:21 +0000
init_main: Fix logging the subsystem of pre-loaded kernel modules
The pre-load, aka linker_preload() runs at the order of SI_SUB_KLD, but
a pre-loaded module may have SYSINITs that have startup order prior to
SI_SUB_KLD, e.g. TUNABLE_INT() / TUNABLE_LONG(), hence it is possible
that we run into abnormal orders.
Without this change, the subsystem of the pre-loaded kernel modules
will be melted into previous one. That is mostly harmless but confusing.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D47904
---
sys/kern/init_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 36ce44b988be..2fa429e6368c 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -296,7 +296,7 @@ mi_startup(void)
BOOTTRACE_INIT("sysinit 0x%7x", sip->subsystem);
#if defined(VERBOSE_SYSINIT)
- if (sip->subsystem > last && verbose_sysinit != 0) {
+ if (sip->subsystem != last && verbose_sysinit != 0) {
verbose = 1;
printf("subsystem %x\n", sip->subsystem);
}