Date: Sun, 15 Dec 2002 16:26:02 +0100 (CET) From: Thomas Quinot <thomas@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/46275: RELENG_4 loader fails to load snd Message-ID: <20021215152602.408D02C3D3@melusine.cuivre.fr.eu.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021215152602.408D02C3D3>