From owner-cvs-src@FreeBSD.ORG Sat Jun 17 00:47:22 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 6FA0A16A474; Sat, 17 Jun 2006 00:47:22 +0000 (UTC) (envelope-from iedowse@iedowse.com) Received: from nowhere.iedowse.com (nowhere.iedowse.com [82.195.144.75]) by mx1.FreeBSD.org (Postfix) with SMTP id 1E67543D49; Sat, 17 Jun 2006 00:47:20 +0000 (GMT) (envelope-from iedowse@iedowse.com) Received: from localhost ([127.0.0.1] helo=iedowse.com) by nowhere.iedowse.com via local-iedowse id ; 17 Jun 2006 01:47:11 +0100 (IST) To: John Baldwin In-Reply-To: Your message of "Fri, 16 Jun 2006 14:57:22 EDT." <200606161457.23420.jhb@freebsd.org> Date: Sat, 17 Jun 2006 01:47:11 +0100 From: Ian Dowse Message-ID: <200606170147.aa09815@nowhere.iedowse.com> Cc: cvs-src@freebsd.org, Ian Dowse , 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: Sat, 17 Jun 2006 00:47:22 -0000 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