From owner-freebsd-audit Tue Dec 17 13:25:23 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F48037B401 for ; Tue, 17 Dec 2002 13:25:22 -0800 (PST) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 078A943ED4 for ; Tue, 17 Dec 2002 13:25:22 -0800 (PST) (envelope-from thomas@freebsd.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id B59022C3D4; Tue, 17 Dec 2002 22:25:13 +0100 (CET) Date: Tue, 17 Dec 2002 22:25:13 +0100 From: Thomas Quinot To: freebsd-audit@freebsd.org Subject: RELENG_4 loader bug Message-ID: <20021217212513.GA79156@melusine.cuivre.fr.eu.org> Reply-To: thomas@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-message-flag: WARNING! Using Outlook can damage your computer. Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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