Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 May 2003 21:52:02 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        current@FreeBSD.org
Subject:   Re: CFR: fifo_open()/fifo_close() patch
Message-ID:  <3EC5BFF2.9359D22F@mindspring.com>
References:  <200305161243.h4GChJM7058171@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help


Don Lewis wrote:
> 
> There are a few problems in the fifo_open() and fifo_close()
> implementations.
> 
>         fifo_open() calls VOP_CLOSE() with the vnode locked, whereas
>         VOP_CLOSE() should be called with the vnode unlocked.

This is actually pretty bogus.  All VOP's, except those that
return (locked) vnodes, or dispose (locked) vnodes that are
managed by the FS itself, should have locked vnodes.  There's
a nasty race condition that occurs because of the VOP_CLOSE()
being called without the vnode locked.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EC5BFF2.9359D22F>