From owner-freebsd-current@FreeBSD.ORG Fri May 16 21:53:17 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 2B21737B401; Fri, 16 May 2003 21:53:17 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A82443F93; Fri, 16 May 2003 21:53:16 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfjpt.dialup.mindspring.com ([165.247.207.61] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19Gth2-0003YG-00; Fri, 16 May 2003 21:53:13 -0700 Message-ID: <3EC5BFF2.9359D22F@mindspring.com> Date: Fri, 16 May 2003 21:52:02 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Don Lewis References: <200305161243.h4GChJM7058171@gw.catspoiler.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4210eec0f03e2c39ad4a79e692b45a58a387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c 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: Sat, 17 May 2003 04:53:17 -0000 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