From owner-cvs-src@FreeBSD.ORG Tue Dec 28 20:43:34 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 680) id 2CFBF16A4CF; Tue, 28 Dec 2004 20:43:34 +0000 (GMT) Date: Tue, 28 Dec 2004 20:43:34 +0000 From: Darren Reed To: alc@cs.rice.edu Message-ID: <20041228204334.GA12977@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/contrib/ipfilter/netinet ip_auth.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Dec 2004 20:43:34 -0000 > Deadlock is not the issue. The implementations of mutex and sx locks > don't support the acquisition of mutexes before sx locks. Roughly > speaking, when a thread is blocked during the acquisition of a held sx > lock, it blocks in a manner similar to tsleep(). For the same reasons > that you can't hold a mutex across a tsleep(), you can't hold a mutex > when acquiring an sx lock. To delve further into this, what is it specifically about sx(9) that is a problem here ? Is it that the thread will sleep on a queue because it uses cv_wait/cv_broadcast ? Is there a PR filed that documents the shortcomings of sx(9) so that the shortcomings of sx(9) are clearly documented for others to see, understand and perhaps fix ? There are so many different things that are wrong here, in FreeBSD, that I just don't know where to start with PR's...but I hope fixing sx(9) is very high on someone's list. So far pfil & ipfw both have their own sx(9)-variant...how many more times will that framework be copied, I wonder ? Darren