RELENG_4 loader bug
Thomas Quinot <[email protected]> Tue, 17 Dec 2002 22:25:13 +0100
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
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