From owner-freebsd-current@FreeBSD.ORG Thu Apr 10 02:24:46 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 D60BC37B401 for ; Thu, 10 Apr 2003 02:24:46 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id C30D143FD7 for ; Thu, 10 Apr 2003 02:24:45 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h3A9ORE09374; Thu, 10 Apr 2003 11:24:27 +0200 (MEST) Date: Thu, 10 Apr 2003 11:24:27 +0200 (CEST) From: Harti Brandt To: Harti Brandt In-Reply-To: <20030410110656.M664@beagle.fokus.fraunhofer.de> Message-ID: <20030410112136.R664@beagle.fokus.fraunhofer.de> References: <20030409183521.D644@beagle.fokus.fraunhofer.de> <20030410110656.M664@beagle.fokus.fraunhofer.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org cc: "M. Warner Losh" 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: Thu, 10 Apr 2003 09:24:47 -0000 On Thu, 10 Apr 2003, Harti Brandt wrote: HB>On Wed, 9 Apr 2003, M. Warner Losh wrote: HB> HB>MWL>How does the lock order get to be radix, driver in the first place? HB> HB>It took me some time to find how this comes. It occures with drivers, that HB>don't use the default ifa_rtrequest, in my case in the midway driver. HB>In rtrequest1 the radix node head is locked. Later on it calls HB>ifa->ifa_rtrequest, which in turn calls the driver, where the driver lock HB>occures. HB> HB>I suppose, that the radix head lock should not be held accross the HB>ifa_rtrequest call, but it is needed a few lines below. Unfortunately my HB>understanding of the routing code is limited, so I don't know whether this HB>could be rearranged. I should add, that I think this can happen with ethernet drivers also (perhaps when manually adding arp entries). It doesn't show up, because none of the ethernet drivers actually uses locks. harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org