cvs commit: src/sys/sys firmware.h src/sys/kern subr_firmware.c

Ian Dowse iedowse at iedowse.com
Sat Jun 17 00:47:22 UTC 2006


In message <200606161457.23420.jhb at freebsd.org>, John Baldwin writes:
>But unloadentry() would never unload such a module because fp->file
>is NULL.  unloadentry() would only call clearentry() and then 
>linker_file_unload() on an explicitly loaded firmware module.

 - driver calls firmware_get, firmware image loaded and fp->file set to non-NULL
 - manually kldload some_module_that_depends_on_firmware_image
 - driver calls firmware_put, unloadentry called and sets fp->file = NULL

If at this point the entry was cleared then all future calls to
firmware_get would fail even though the module is still available,
referenced and loaded.

I'm not saying that these cases are particularly important or that
there aren't bugs in the current code; just that mixing up the
layers doesn't help ;-)

Ian


More information about the cvs-src mailing list