From owner-freebsd-current@FreeBSD.ORG Sun Jul 18 20:00:11 2004 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 7DEFB16A4CE; Sun, 18 Jul 2004 20:00:11 +0000 (GMT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0C6643D48; Sun, 18 Jul 2004 20:00:10 +0000 (GMT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 925E21FF931; Sun, 18 Jul 2004 22:00:08 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id B209F1FF9A6; Sun, 18 Jul 2004 22:00:06 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 2F7AA155DD; Sun, 18 Jul 2004 19:57:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 2486B1539E; Sun, 18 Jul 2004 19:57:11 +0000 (UTC) Date: Sun, 18 Jul 2004 19:57:11 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Brian Fundakowski Feldman In-Reply-To: <20040718193513.GV1626@green.homeunix.org> Message-ID: References: <20040718193513.GV1626@green.homeunix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: FreeBSD current mailing list Subject: Re: kldunload if_sk -> LOR & panic 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: Sun, 18 Jul 2004 20:00:11 -0000 On Sun, 18 Jul 2004, Brian Fundakowski Feldman wrote: > On Sun, Jul 18, 2004 at 03:11:22PM +0000, Bjoern A. Zeeb wrote: > > Hi, > > > > tried to unload if_sk for testing the newly built module with dwhite's > > locking patch (will be loaded after reset now :( ). > > resulted in this on my amd64: > > > > --- cut --- > > noc# kldunload if_sk > > e1000phy0: detached > > miibus0: detached > > lock order reversal > > 1st 0xffffff0030ac7870 skc0 (network driver) @ sys/pci/if_sk.c:2604 > > 2nd 0xffffff0000b91af0 radix node head (radix node head) @ sys/netinet/in_rmx.c:391 > > Stack backtrace: > > witness_checkorder() at witness_checkorder+0x4a6 > > _mtx_lock_flags() at _mtx_lock_flags+0x39 > > in_ifadown() at in_ifadown+0x5b > > in_control() at in_control+0x81c > > if_detach() at if_detach+0x50b > > ether_ifdetach() at ether_ifdetach+0x25 > > sk_detach() at sk_detach+0x6d > > (null)() at 0 > > null_method() at null_method > > At the point where it's actually detaching, once it's detached the methods > that access its softc, it should drop its softc lock before calling the > network-level detach routines. I think this is handled by dwhite's patch so I should be safe now. Perhaps someone could work towards committing a cleaned up version of this patch ? -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT