git: b2293f7f60c2 - stable/14 - init_main: Fix logging the subsystem of pre-loaded kernel modules

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Sat, 27 Sep 2025 15:13:58 UTC
The branch stable/14 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=b2293f7f60c238e7a83551472aed9452cd017769

commit b2293f7f60c238e7a83551472aed9452cd017769
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-03 10:14:21 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-09-27 15:11:36 +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
    
    (cherry picked from commit 11f1dd193af57dfa5128eadc62b084502292a784)
---
 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 5835db44b853..9fb92dfb12f2 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -300,7 +300,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);
 		}