Fix a bug in the kernel module runtime linker that made it impossible
to unload the usb.ko module after boot if it was originally preloaded from "/boot/loader.conf". When processing preloaded modules, the linker erroneously added self-dependencies the each module's reference count. That prevented usb.ko's reference count from ever going to 0, so it could not be unloaded. Sponsored by Isilon Systems. Reviewed by: pjd, peter MFC after: 1 week
This commit is contained in:
parent
32a93330de
commit
a3d0544135
@ -1337,6 +1337,9 @@ linker_preload(void *arg)
|
||||
modname = mp->md_cval;
|
||||
verinfo = mp->md_data;
|
||||
mod = modlist_lookup2(modname, verinfo);
|
||||
/* Don't count self-dependencies */
|
||||
if (lf == mod->container)
|
||||
continue;
|
||||
mod->container->refs++;
|
||||
error = linker_file_add_dependency(lf,
|
||||
mod->container);
|
||||
|
Loading…
Reference in New Issue
Block a user