RE: RELENG_4 loader bug

[email protected] Tue, 17 Dec 2002 16:49:37 -0500
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
Pls take "[email protected]" off your distribution. thanks

-----Original Message-----
From: Thomas Quinot [mailto:[email protected]] 
Sent: Tuesday, 17 December, 2002 4:25 PM
To: [email protected]
Subject: RELENG_4 loader bug


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);

-- 
    [email protected]

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message

############################################################
This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not the intended 
recipient, please contact the sender by reply email and 
destroy all copies of the original message.  Any views 
expressed in this message are those of the individual 
sender, except where the sender specifically states them 
to be the views of Intelsat, Ltd. and its subsidiaries.
############################################################

To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message