Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jun 2006 01:47:11 +0100
From:      Ian Dowse <iedowse@iedowse.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        cvs-src@freebsd.org, Ian Dowse <iedowse@iedowse.com>, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/sys firmware.h src/sys/kern subr_firmware.c
Message-ID:  <200606170147.aa09815@nowhere.iedowse.com>
In-Reply-To: Your message of "Fri, 16 Jun 2006 14:57:22 EDT." <200606161457.23420.jhb@freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200606161457.23420.jhb@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606170147.aa09815>