From owner-cvs-src@FreeBSD.ORG Mon Jun 12 20:31:13 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1BD316A60D; Mon, 12 Jun 2006 20:31:13 +0000 (UTC) (envelope-from john@baldwin.cx) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5575843D46; Mon, 12 Jun 2006 20:31:13 +0000 (GMT) (envelope-from john@baldwin.cx) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k5CKVB3e015271; Mon, 12 Jun 2006 16:31:12 -0400 (EDT) (envelope-from john@baldwin.cx) From: John Baldwin To: Ian Dowse Date: Mon, 12 Jun 2006 16:31:06 -0400 User-Agent: KMail/1.9.1 References: <200606101704.k5AH479k065331@repoman.freebsd.org> In-Reply-To: <200606101704.k5AH479k065331@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606121631.07177.john@baldwin.cx> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 12 Jun 2006 16:31:12 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1534/Mon Jun 12 08:30:53 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx 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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2006 20:31:14 -0000 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