From owner-freebsd-current Tue Dec 31 12:52:53 2002 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 ACFF037B401 for ; Tue, 31 Dec 2002 12:52:52 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 472A743EA9 for ; Tue, 31 Dec 2002 12:52:48 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 90319 invoked by uid 1000); 31 Dec 2002 20:52:35 -0000 Date: Tue, 31 Dec 2002 12:52:35 -0800 (PST) From: Nate Lawson To: ryan beasley Cc: freebsd-current@freebsd.org Subject: Re: witness: could sleep with "dc0" locked In-Reply-To: <20021231171347.GC311@goddamnbastard.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 31 Dec 2002, ryan beasley wrote: > Not sure if this is already known, and I'm not knowledgeable enough to > tell if this is a harmless warning or an indicator of trouble down the > road. (I'm assuming the prior as witness normally has a reason to > complain, right? :).) Many of these locking issues are known but require more in-depth solutions (that are underway). In practice, this one should not cause trouble but still should eventually be fixed. > /usr/src/sys/vm/uma_core.c:1330: could sleep with "dc0" locked from /usr/src/sys/pci/if_dc.c:691 This message is incorrect, the actual lock was acquired in if_dc.c: Try this patch although it may be incorrect if ether_ifattach() depends on the device-specific lock to be held (although that wouldn't really make sense to me). --- /sys/pci/if_dc.c.orig Tue Dec 3 11:44:22 2002 +++ /sys/pci/if_dc.c Tue Dec 31 12:46:32 2002 @@ -2268,7 +2268,9 @@ /* * Call MI attach routine. */ + DC_UNLOCK(sc); ether_ifattach(ifp, eaddr); + DC_LOCK(sc); /* * Tell the upper layer(s) we support long frames. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message