From owner-cvs-all@FreeBSD.ORG Sun Jul 3 00:59:40 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9067516A7DE; Sun, 3 Jul 2005 00:57:03 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D00F44E6F; Sun, 3 Jul 2005 00:36:23 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id 5F7A36CDE0; Sat, 2 Jul 2005 17:36:07 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 2EB525C9C5 for ; Mon, 27 Dec 2004 19:17:15 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 0DFC655A19 for ; Tue, 28 Dec 2004 03:17:15 +0000 (GMT) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id 2783016A4DB; Tue, 28 Dec 2004 03:17:11 +0000 (GMT) Delivered-To: ps@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 9555B16A4D0; Tue, 28 Dec 2004 03:17:08 +0000 (GMT) Delivered-To: src-committers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 680) id 2AE6816A4CF; Tue, 28 Dec 2004 03:17:07 +0000 (GMT) From: Darren Reed To: Alan Cox Message-ID: <20041228031707.GA38011@hub.freebsd.org> References: <20041226165927.GA18879@hub.freebsd.org> <20041226182537.GB20920@hub.freebsd.org> <20041226.222435.52824948.imp@bsdimp.com> <20041227054931.GC20920@hub.freebsd.org> <20041227204846.GC15591@noel.cs.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041227204846.GC15591@noel.cs.rice.edu> User-Agent: Mutt/1.4.2.1i Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: Cc: src-committers@freebsd.org, cvs-src@freebsd.org, scottl@freebsd.org, cvs-all@freebsd.org, darrenr@freebsd.org, bzeeb-lists@lists.zabbadoz.net, "M. Warner Losh" Subject: Re: cvs commit: src/sys/contrib/ipfilter/netinet ip_auth.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:59:43 -0000 X-Original-Date: Tue, 28 Dec 2004 03:17:07 +0000 X-List-Received-Date: Sun, 03 Jul 2005 00:59:43 -0000 On Mon, Dec 27, 2004 at 02:48:46PM -0600, Alan Cox wrote: > Darren, > > Based upon a quick look at the above URL, I would say that the problem > is that you are acquiring an sx lock after a mutex is held. Yes, that is what I thought the problem was too. > That is not allowed. Well, it should be. > More generally, an sx lock is termed a "sleepable" lock > and a mutex is not; all desired sleepable locks must be acquired > before any non-sleepable locks are acquired. Witness enforces this > prohibition, but perhaps causes confusion by calling it a reversal. What can I say that I haven't already ? This is a nonsense rule and I'm quite happy that it isn't enforced at all. The assumption by someone that all of these scenarios lead to deadlocks is false. I imagine it is part of why things like the IFNET_*LOCK macros use mtx rather than sx. On systems where the interface list is of non-trivial size, I imagine this would have a measurable impact. Perhaps the most stupid realisation from this has been that IPFilter code gets called with a UDP mutex of some sort held. Like WTF ? Darren