]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix page fault that occurred when trying to initialize preloaded kernel module,
authortrasz <trasz@FreeBSD.org>
Wed, 5 Jan 2011 09:58:41 +0000 (09:58 +0000)
committertrasz <trasz@FreeBSD.org>
Wed, 5 Jan 2011 09:58:41 +0000 (09:58 +0000)
commitaf6310a6666a5a9f5af85c7e784288791a6cbcd6
treebe6970d17db17c3a0254911d71da2c677ec33039
parent6b3c290093dd0d06e55cf974c1f7a721e5d9afb4
Fix page fault that occurred when trying to initialize preloaded kernel module,
the dependency of which was preloaded, but failed to initialize.  Previously,
kernel dereferenced NULL pointer returned by modlist_lookup2(); now, when this
happens, we unload the dependent module.  Since the depended_files list is
sorted in dependency order, this properly propagates, unloading modules that
depend on failed ones.

From the user point of view, this prevents the kernel from panicing when
trying to boot kernel compiled without KDTRACE_HOOKS with dtraceall_load="YES"
in /boot/loader.conf.

Reviewed by: kib
sys/kern/kern_linker.c