cvs commit: src/sys/sys firmware.h src/sys/kern subr_firmware.c
John Baldwin
john at baldwin.cx
Mon Jun 12 20:31:14 UTC 2006
On Saturday 10 June 2006 13:04, Ian Dowse wrote:
> iedowse 2006-06-10 17:04:07 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/sys firmware.h
> sys/kern subr_firmware.c
> Log:
> Keep firmware images on the list until they have been unregistered
> with firmware_unregister(). Previously when the last driver reference
> had been dropped we would clear the list entry under the assumption
> that the firmware module was about to be unloaded, but this was not
> true if the firmware image had been loaded manually with kldload.
>
> This makes it possible to manually kldload firmware images as a
> workaround for drivers such as ipw that attempt to load firmware
> while resuming after a suspend.
>
> Reviewed by: mlaier (an earlier version of the patch)
I think you still need to clear the entire entry in unloadentry() and not just
clear fp->file. Otherwise, another thread could gain a reference on this
entry in the table after you drop the firmware mutex and before
firmware_unregister() is ran by the kernel linker.
--
John Baldwin
More information about the cvs-src
mailing list