Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jun 2006 16:31:06 -0400
From:      John Baldwin <john@baldwin.cx>
To:        Ian Dowse <iedowse@freebsd.org>
Cc:        cvs-src@freebsd.org, 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:  <200606121631.07177.john@baldwin.cx>
In-Reply-To: <200606101704.k5AH479k065331@repoman.freebsd.org>
References:  <200606101704.k5AH479k065331@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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