From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 11 14:40:07 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ABF7137B401 for ; Mon, 11 Aug 2003 14:40:07 -0700 (PDT) Received: from smtp5.Stanford.EDU (smtp5.Stanford.EDU [171.67.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32B7243F93 for ; Mon, 11 Aug 2003 14:40:07 -0700 (PDT) (envelope-from tedu@stanford.edu) Received: (from root@localhost) by smtp5.Stanford.EDU (8.12.9/8.12.9) id h7BLe6vv027430 for freebsd-hackers@freebsd.org; Mon, 11 Aug 2003 14:40:06 -0700 (PDT) Received: from saga8.Stanford.EDU (saga8.Stanford.EDU [171.64.15.138]) by smtp5.Stanford.EDU (8.12.9/8.12.9) with ESMTP id h7BLe4x9027399 for ; Mon, 11 Aug 2003 14:40:05 -0700 (PDT) Date: Mon, 11 Aug 2003 14:40:04 -0700 (PDT) From: Ted Unangst To: freebsd-hackers@freebsd.org In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: possible deadlocks? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2003 21:40:08 -0000 one more. This falls into the very improbable category. Ordinarily, I don't think this is possible because FreeBSD doesn't support hotplug PCI, so sk attachment can't be raced. However, assuming I had some hot plug sk card, it seems like running ifconfig sk0 at just the wrong point during sk1 attach will deadlock. If it absolutely can not happen (for a reason other than sk is attached before init runs) please explain. sk.c: sk_attach_xmac() SK_LOCK(sc); /* grabs */ ether_ifattach() ifattach() IFNET_WLOCK() /* waits for 2 */ in6_ifattach.c: in6_nigroup_attach() IFNET_RLOCK() /* grabs */ in6_addmulti() if_addmulti() sk_ioctl() SK_IF_LOCK(); /* waits for 1 */ -- "First, it was not a strip bar, it was an erotic club. And second, what can I say? I'm a night owl." - M. Barry, Mayor of Washington, DC