From owner-cvs-all@FreeBSD.ORG Wed Apr 30 08:17:19 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90D9C37B401; Wed, 30 Apr 2003 08:17:19 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BC0E43FBF; Wed, 30 Apr 2003 08:17:18 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.8/8.12.3) with ESMTP id h3UFHFA7097766; Wed, 30 Apr 2003 09:17:15 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 30 Apr 2003 09:17:01 -0600 (MDT) Message-Id: <20030430.091701.112720131.imp@bsdimp.com> To: brandt@fokus.fraunhofer.de From: "M. Warner Losh" In-Reply-To: <20030430093931.V31027@beagle.fokus.fraunhofer.de> References: <20030429.122808.116092806.imp@bsdimp.com> <20030430093931.V31027@beagle.fokus.fraunhofer.de> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: nate@root.org Subject: Re: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2003 15:17:20 -0000 In message: <20030430093931.V31027@beagle.fokus.fraunhofer.de> Harti Brandt writes: : On Tue, 29 Apr 2003, M. Warner Losh wrote: : : MWL>In message: : : MWL>: > 4) Return immediately if gone is true in fxp_ioctl : MWL>: > 5) Return immediately if gone is true in fxp_intr : MWL>: : MWL>: Not sure this approach is necessary. : MWL> : MWL>I am. Otherwise ioctl panics with recursive locks when the card is : MWL>detached. A simple kld_unload if_fxp would provoke these races, : MWL>including the recursive lock panic. : : You can replace the pointers to ioctl and start with pointers to dummy : functions. In fact, an if_dead(ifp) function which does just this would : be nice to have. ifdetach calls these ioctl to properly shutdown the network interface before it goes away. I don't think we should jump the gun and do a if_dead and encourage its use until we have the driver level locking stuff worked out. Since drivers are leaves, any locking that's done there now is likely going to have a lot of issues because the other major kernel systems aren't completely locked yet. I don't think it would be time well spent to work out all the races until the rest of the kernel is locked. Too bad locking it is so much harder than locking drivers :-( Warner