Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Dec 2002 22:25:13 +0100
From:      Thomas Quinot <thomas@freebsd.org>
To:        freebsd-audit@freebsd.org
Subject:   RELENG_4 loader bug
Message-ID:  <20021217212513.GA79156@melusine.cuivre.fr.eu.org>

next in thread | raw e-mail | index | archive | help
Dear -audit folks,

Could you please review this patch to the RELENG_4 loader?
It fixes kern/46275 (this bug is specific to -stable, I was unable
to reproduce it with -current).

When the last module in a dependency chain fails to load with EEXIST,
an error of 0 must be returned to the caller, or else the whole
set of newly-loaded modules will be discarded.

Index: module.c
===================================================================
RCS file: /home/ncvs/src/sys/boot/common/module.c,v
retrieving revision 1.13.2.3
diff -u -r1.13.2.3 module.c
--- module.c	12 Jun 2001 15:35:14 -0000	1.13.2.3
+++ module.c	15 Dec 2002 15:09:07 -0000
@@ -369,7 +369,9 @@
 	if (mod_findmodule(NULL, dmodname) == NULL) {
 	    printf("loading required module '%s'\n", dmodname);
 	    error = mod_load(dmodname, 0, NULL);
-	    if (error && error != EEXIST)
+	    if (error == EEXIST)
+		error = 0;
+	    if (error != 0)
 		break;
 	}
 	md = metadata_next(md, MODINFOMD_DEPLIST);

-- 
    Thomas.Quinot@Cuivre.FR.EU.ORG

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021217212513.GA79156>