Date: Sun, 4 May 2003 11:05:02 +0200 From: Nicolai Petri <nicolai@catpipe.net> To: current@freebsd.org Subject: Patches for fixing module load/unload panics Message-ID: <200305041105.02424.nicolai@catpipe.net>
next in thread | raw e-mail | index | archive | help
--Boundary-00=_+eNt+AB8ePEKtiF Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all As the codefreeze is due very soon now (tm) I send in theese patches and hopes theese get commited before. patch 1 (kern_linker.patch) : This fixes panics related to loading a module that's already compiled into the kernel. (patch 2 avoids some of the problems too) It works by traversing the loaded module list, and if it's already loaded it simply aborts the moduleregistering process and returns EEXISTS. patch 2 (kern_sysctl.patch) : This patch is somewhat related to the same issue as patch 1. When loading a module that contains a sysctl already present in the kernel, the sysctl_register fails. When unloading the module again it calls sysctl_unregister() and that leads to instant panic because of missing validity checks in sysctl_unregister. The above 2 patches fixes 70-80 % of the kld unload related crashes I've seen so far, but I know there is many ghosts hidden in the current kld-framework and I'm trying to tidy this up a bit. Being realistic this means that a lot of patches like the above will go to the 5.x tree and hopefully a reworked kld-framework for 6.x. In my quest for fixing/redesigning the kld framework I'm currently working on a document describing my thoughts on this matter. The document and newest versions of my patches can be found on this website : http://hobbes.bsd-dk.dk/~npp/ Cheers, Nicolai Petri catpipe Systems ApS --Boundary-00=_+eNt+AB8ePEKtiF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305041105.02424.nicolai>
