From owner-freebsd-current Mon Jan 6 17: 4:15 2003 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 4817837B401 for ; Mon, 6 Jan 2003 17:04:14 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 053E343E4A for ; Mon, 6 Jan 2003 17:04:14 -0800 (PST) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id 3389BAE28D; Mon, 6 Jan 2003 17:04:05 -0800 (PST) Date: Mon, 6 Jan 2003 17:04:05 -0800 From: Maxime Henrion To: Nate Lawson Cc: current@freebsd.org, ryan beasley Subject: Re: if_dc.c locking patch Message-ID: <20030107010405.GB66404@elvis.mu.org> References: <20030104074914.GS311@goddamnbastard.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i 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 Nate Lawson wrote: > Attached is a diff that fixes a "could sleep" problem where > ether_ifattach() does a malloc and dc(4) is holding a lock in its softc. > It uses a cleaner exit strategy with only one call to DC_UNLOCK and no > multiple return statements as well as fixing one place where "error" > wasn't set. If people are ok with it, I'll sweep other drivers that have > a similar problem. Doing this would maybe be a bit premature. A lot of drivers have FOO_LOCK and FOO_UNLOCK macros set to nothing, because of similar problems you're trying to fix. Interface locking probably needs to be rethought. Cheers, Maxime To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message