From owner-freebsd-current@FreeBSD.ORG Fri May 16 06:42:32 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E25FE37B401; Fri, 16 May 2003 06:42:32 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5586143F93; Fri, 16 May 2003 06:42:31 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id XAA11339; Fri, 16 May 2003 23:42:28 +1000 Date: Fri, 16 May 2003 23:42:26 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Don Lewis In-Reply-To: <200305161243.h4GChJM7058171@gw.catspoiler.org> Message-ID: <20030516233858.U12541@gamplex.bde.org> References: <200305161243.h4GChJM7058171@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: CFR: fifo_open()/fifo_close() patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 13:42:33 -0000 On Fri, 16 May 2003, Don Lewis wrote: > There are a few problems in the fifo_open() and fifo_close() > implementations. > ... > This patch makes the following changes: > > Create fifo_inactive() and free the fifo data structures there > instead of in fifo_close() to eliminate the need for fifo_open() > call fifo_close() in some of the failure cases. This also > eliminates the need for the vrefcnt() call in fifo_close(). > > Protect fip->fi_{readers,writers} with the vnode interlock in both > fifo_open() and fifo_close(). > > Convert from tsleep() to msleep() using the vnode interlock to > eliminate the race condition. Why not just lock the vnode in fifo_close()? RELENG[2-4] seems to have the same bug. I cannot be fixed there using the vnode interlock. Bruce