From owner-freebsd-bugs Sun Dec 15 7:30:11 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5A3237B401 for ; Sun, 15 Dec 2002 07:30:08 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24E4E43ED4 for ; Sun, 15 Dec 2002 07:30:08 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gBFFU7x3001412 for ; Sun, 15 Dec 2002 07:30:07 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gBFFU7fT001411; Sun, 15 Dec 2002 07:30:07 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D8F437B401 for ; Sun, 15 Dec 2002 07:25:46 -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 A2C5243ED1 for ; Sun, 15 Dec 2002 07:25:45 -0800 (PST) (envelope-from thomas@cuivre.fr.eu.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 408D02C3D3; Sun, 15 Dec 2002 16:26:02 +0100 (CET) Message-Id: <20021215152602.408D02C3D3@melusine.cuivre.fr.eu.org> Date: Sun, 15 Dec 2002 16:26:02 +0100 (CET) From: Thomas Quinot Reply-To: Thomas Quinot To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/46275: RELENG_4 loader fails to load snd Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 46275 >Category: kern >Synopsis: RELENG_4 loader fails to load snd >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Dec 15 07:30:07 PST 2002 >Closed-Date: >Last-Modified: >Originator: Thomas Quinot >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD melusine.cuivre.fr.eu.org 4.7-STABLE FreeBSD 4.7-STABLE #4: Sun Dec 15 13:52:26 CET 2002 thomas@melusine.cuivre.fr.eu.org:/usr2/obj/usr2/src/sys/MELUSINE i386 >Description: The RELENG_4 loader cannot load the snd module together with its dependencies using 'load snd' (or snd_load="YES") in loader.conf because the last module in the dependency graph (snd_pcm presumably) has already been loaded as a result of previous dependencies. The returned EEXIST error is erroneously propagated to the caller of file_load_dependencies. NB: I do not know what the situation with CURRENT is. >How-To-Repeat: Type 'load snd' at the loader prompt with a kernel that does not have compiled-in sound drivers. The snd module and its dependencies will be loaded, but then a 'module is already loaded' message will be emitted, and all the newly-loaded modules will be discarded (as can be confirmed using lsmod). >Fix: This patch against RELENG_4 appears to fix the problem for me; please review. 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); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message