From owner-freebsd-current  Mon Mar 18 10:31:57 2002
Delivered-To: freebsd-current@freebsd.org
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
	by hub.freebsd.org (Postfix) with ESMTP
	id D6CAC37B400; Mon, 18 Mar 2002 10:31:51 -0800 (PST)
Received: by elvis.mu.org (Postfix, from userid 1192)
	id C3C51AE160; Mon, 18 Mar 2002 10:31:51 -0800 (PST)
Date: Mon, 18 Mar 2002 10:31:51 -0800
From: Alfred Perlstein <bright@mu.org>
To: John Baldwin <jhb@FreeBSD.org>
Cc: Robert Watson <rwatson@FreeBSD.ORG>, smp@FreeBSD.ORG,
	current@FreeBSD.ORG, hitmaster2k@yahoo.com, phk@FreeBSD.ORG,
	tanimura@r.dl.itc.u-tokyo.ac.jp,
	Munehiro Matsuda <haro@h4.dion.ne.jp>
Subject: Re: -current lock warning...
Message-ID: <20020318183151.GA22622@elvis.mu.org>
References: <Pine.NEB.3.96L.1020317120811.965J-100000@fledge.watson.org> <XFMail.20020318132404.jhb@FreeBSD.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <XFMail.20020318132404.jhb@FreeBSD.org>
User-Agent: Mutt/1.3.27i
Sender: owner-freebsd-current@FreeBSD.ORG
Precedence: bulk
List-ID: <freebsd-current.FreeBSD.ORG>
List-Archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-Help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-Subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-current>
List-Unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-current>
X-Loop: FreeBSD.ORG

* John Baldwin <jhb@FreeBSD.org> [020318 10:24] wrote:
> 
> On 17-Mar-2002 Robert Watson wrote:
> > 
> > On Sun, 17 Mar 2002, Alfred Perlstein wrote:
> > 
> >> * Munehiro Matsuda <haro@h4.dion.ne.jp> [020317 06:36] wrote:
> >> > 
> >> > PS. I got another message that happend when I ^C'ed a buildworld earlier, 
> >> > with same kernel. May be it should go to Alfred Perlstein?
> >> > 
> >> > lock order reversal
> >> >  1st 0xc198eec0 pipe mutex @ ../../../kern/sys_pipe.c:779
> >> >  2nd 0xc0367fe0 Giant @ ../../../i386/i386/trap.c:716
> >> 
> >> I think there's a place where the pipe can fault on an address while
> >> copying, I'll take a look at this. 
> > 
> > Are there any assertions that should be in place for copyin/copyout
> > requring fault handling?  It sounds like somewhere we need to assert that
> > Giant is held...
> 
> More correct is that probably no locks other than Giant should be held for
> copyin/copyout.

s/probably/definetly.

Can you please provide a "blessed" API for raising and lowering a
"can't block" count in the thread?  This can be used in copyout,
copyin, and a bunch of vm and buffer ops to make sure we aren't calling
them with mutexes held.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message