Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 May 2003 23:42:26 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Don Lewis <truckman@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: CFR: fifo_open()/fifo_close() patch
Message-ID:  <20030516233858.U12541@gamplex.bde.org>
In-Reply-To: <200305161243.h4GChJM7058171@gw.catspoiler.org>
References:  <200305161243.h4GChJM7058171@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030516233858.U12541>