From darrenr@FreeBSD.ORG  Thu Dec 30 14:06:38 2004
Return-Path: <darrenr@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 680)
	id 62E7C16A4CF; Thu, 30 Dec 2004 14:06:38 +0000 (GMT)
Message-Id: <20041230140638.GA65403@hub.freebsd.org>
Date: Thu, 30 Dec 2004 14:06:38 +0000
From: Darren Reed <darrenr@hub.freebsd.org>
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc: Darren Reed <darrenr@FreeBSD.ORG>, bug-followup@FreeBSD.ORG
In-Reply-To: <20041228232917.GA749@gothmog.gr>
Subject: Re: man page for sx(9) is misleading
References: <20041228135534.F30B916A4CF@hub.freebsd.org> <20041228232917.GA749@gothmog.gr>

>Number:         75655
>Category:       docs
>Synopsis:       Re: man page for sx(9) is misleading
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    keramida
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 30 14:10:21 GMT 2004
>Closed-Date:    Mon Jan 03 06:01:53 GMT 2005
>Last-Modified:  Mon Jan 03 06:02:17 GMT 2005
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 On Wed, Dec 29, 2004 at 01:29:17AM +0200, Giorgos Keramidas wrote:
 > On 2004-12-28 13:55, Darren Reed <darrenr@FreeBSD.ORG> wrote:
 > >
 > > According to discussion on freebsd mailing lists, it is not possible
 > > to hold an sx lock when you want a mtx lock.  This should be documented.
 > 
 > As far as I can tell, by looking at kern_sx.c and sys/sx.h, this is
 > because the sx lock initialization uses an mtxpool for the mutex used to
 > serialize access to the internal sx lock data.
 > 
 > Leaf locks may be used in operations that msleep() but there can be only
 > one of them in each lock path and no other lock can be obtained after
 > them.
 > 
 > This is sort of implied by the SEE ALSO reference of mtx_pool(9), but we
 > should probably state it explicitly in CONTEXT.
 
 What you wrote is not right.  You cannot acquire an sx(9) lock while holding
 an mtx(9) lock.
 
 Darren
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Jan 3 06:01:01 GMT 2005 
State-Changed-Why:  
Misfiled followup to docs/75571; content migrated. 


Responsible-Changed-From-To: gnats-admin->keramida 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jan 3 06:01:01 GMT 2005 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=75655 
>Unformatted:
