From owner-freebsd-current@FreeBSD.ORG Fri Apr 11 20:42:45 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D66037B401; Fri, 11 Apr 2003 20:42:45 -0700 (PDT) Received: from mta5.snfc21.pbi.net (mta5.snfc21.pbi.net [206.13.28.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1138C43FA3; Fri, 11 Apr 2003 20:42:45 -0700 (PDT) (envelope-from hsu@FreeBSD.org) Received: from FreeBSD.org ([63.193.112.125]) by mta5.snfc21.pbi.net (iPlanet Messaging Server 5.1 HotFix 1.6 (built Oct 18 2002)) with ESMTP id <0HD7006Z8O9T0N@mta5.snfc21.pbi.net>; Fri, 11 Apr 2003 20:27:29 -0700 (PDT) Date: Fri, 11 Apr 2003 20:29:35 -0700 From: Jeffrey Hsu In-reply-to: "Your message of Fri, 11 Apr 2003 18:11:30 +0200." <20030411175926.U1137@beagle.fokus.fraunhofer.de> To: harti@FreeBSD.ORG Message-id: <0HD7006Z9O9T0N@mta5.snfc21.pbi.net> MIME-version: 1.0 X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT cc: freebsd-current@FreeBSD.ORG Subject: Re: LOR in if_detach X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2003 03:42:45 -0000 > Do you think of something like the following? > static int > foo_detach(device_t dev) > { > ... > > LOCK(softc); The other big race here is between detach and the next attach. This is better solved with a lock at the interface layer rather than on the softc. Jeffrey