Date: Wed, 16 Jun 1999 14:32:05 +0400 (MSD) From: isupov@moonhe.jinr.ru To: FreeBSD-gnats-submit@freebsd.org Subject: kern/12239: KLD module's load/unload errors handled in strange way (or ignored ?) Message-ID: <199906161032.OAA24531@moonhe.jinr.ru>
next in thread | raw e-mail | index | archive | help
>Number: 12239 >Category: kern >Synopsis: KLD module's load/unload errors handled in strange way (or ignored ?) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 16 04:10:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Isupov A.Yu. >Release: FreeBSD 3.2-RELEASE i386 >Organization: JINR, LHE >Environment: FreeBSD 3.2-RELEASE i386 (need nothing else than standard installation) >Description: 1) If in a KLD module <sometning_mod>.ko the function <sometning_mod>_modevent(struct module *module, int cmd, void *arg) returns error at loading time (f.e. : case MOD_LOAD : if (...) { error = ENXIO; break; } ), kldload(8) returns 0 (success !!!) and we have picture of the following style: % kldstat -v Id Refs Address Size Name ... 30 1 0xc0921000 2000 <something_mod>.ko Contains modules: Id Name instead of full absence of <something_mod>.ko here (as was in the 3.0-RELEASE). Such strange object not contains syscall, realised in <something_mod>.ko, and can be successfully removed by kldunload(8), but what the reasons for its appearing at all ?!! 2) If in a KLD module <sometning_mod>.ko the same function returns error at unloading time (f.e. : case MOD_UNLOAD : if (...) { error = ETXTBSY; break; } ), kldunload(8) returns 1 (nonzero, this seems correct...), <something_mod>.ko still appear in the kldstat output ( % kldstat -v Id Refs Address Size Name ... 31 1 0xc0921000 2000 <something_mod>.ko Contains modules: Id Name 45 <something_mod> ), but syscall, which <something_mod> realises, already removed: % /usr/share/examples/kld/syscall/test/test Bad system call - core dumped (test obtains 12 signal) !!! >How-To-Repeat: Play with /usr/share/examples/kld/syscall/module/syscall.c . >Fix: 1) Don't know, at least because module_register_init() in /sys/kern/kern_module.c of type void now. 2) ??? What are you think, described behaviour is a bug or a feature ? >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?199906161032.OAA24531>