From owner-cvs-all@FreeBSD.ORG Mon Dec 27 20:49:06 2004 Return-Path: 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 1FDF416A4D3; Mon, 27 Dec 2004 20:49:06 +0000 (GMT) Received: from cs.rice.edu (cs.rice.edu [128.42.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE5AC43D53; Mon, 27 Dec 2004 20:49:05 +0000 (GMT) (envelope-from alc@cs.rice.edu) Received: from localhost (calypso.cs.rice.edu [128.42.1.127]) by cs.rice.edu (Postfix) with ESMTP id E62424A9C2; Mon, 27 Dec 2004 14:49:04 -0600 (CST) Received: from cs.rice.edu ([128.42.1.30]) by localhost (calypso.cs.rice.edu [128.42.1.127]) (amavisd-new, port 10024) with LMTP id 07218-01-26; Mon, 27 Dec 2004 14:49:04 -0600 (CST) Received: from noel.cs.rice.edu (noel.cs.rice.edu [128.42.1.136]) by cs.rice.edu (Postfix) with ESMTP id 5D0B84A9D8; Mon, 27 Dec 2004 14:49:04 -0600 (CST) Received: (from alc@localhost) by noel.cs.rice.edu (8.12.10+Sun/8.12.9/Submit) id iBRKmkxl017600; Mon, 27 Dec 2004 14:48:46 -0600 (CST) Date: Mon, 27 Dec 2004 14:48:46 -0600 From: Alan Cox To: Darren Reed Message-ID: <20041227204846.GC15591@noel.cs.rice.edu> References: <20041226165927.GA18879@hub.freebsd.org> <20041226182537.GB20920@hub.freebsd.org> <20041226.222435.52824948.imp@bsdimp.com> <20041227054931.GC20920@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041227054931.GC20920@hub.freebsd.org> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavis-20030616-p7 at cs.rice.edu cc: src-committers@freebsd.org cc: cvs-src@freebsd.org cc: scottl@freebsd.org cc: cvs-all@freebsd.org cc: darrenr@freebsd.org cc: bzeeb-lists@lists.zabbadoz.net cc: "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.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Dec 2004 20:49:06 -0000 On Mon, Dec 27, 2004 at 05:49:31AM +0000, Darren Reed wrote: > On Sun, Dec 26, 2004 at 10:24:35PM -0700, M. Warner Losh wrote: > > In message: <20041226182537.GB20920@hub.freebsd.org> > > Darren Reed writes: > > : On Sun, Dec 26, 2004 at 05:09:23PM +0000, Bjoern A. Zeeb wrote: > > : > [1] http://sources.zabbadoz.net/freebsd/lor.html#050 > > : > > : This would appear, to me, as deficencies in the witness code > > : and that perhaps LORs, unless they are in the leadup to a system > > : deadlock'ing, are just something to be ignored. > > > > Nearly all LORs could lead to system deadlock, especially in low > > resource situations. It is highly doubtful that there's a problem in > > witness. You should fix your code and not ignore the warning. > > As you say, "Nearly all", not "all". I believe the IPFilter ones fall > outside of the "all" group. > > Given what I have seen the witness code do with LOR checking, it is > trivial to write code that generates a LOR warning without ever being > vulnerable to causing a system deadlock through resource problems. > > I believe the person who developed witness realised this in time and > hence added the "blessed" option so tha twarnings would not be emitted > for specific known safe cases. 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. That is not allowed. 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. Alan