From owner-freebsd-current Sat Nov 6 12:50:38 1999 Delivered-To: freebsd-current@freebsd.org Received: from arc.hq.cti.ru (arc.hq.cti.ru [195.34.40.3]) by hub.freebsd.org (Postfix) with ESMTP id 9612114C9E; Sat, 6 Nov 1999 12:50:29 -0800 (PST) (envelope-from dima@tejblum.pp.ru) Received: (from uucp@localhost) by arc.hq.cti.ru (8.9.3/8.9.3) with UUCP id XAA24667; Sat, 6 Nov 1999 23:50:28 +0300 (MSK) (envelope-from dima@tejblum.pp.ru) Received: from tejblum.pp.ru (localhost [127.0.0.1]) by tejblum.pp.ru (8.9.3/8.9.3) with ESMTP id XAA03228; Sat, 6 Nov 1999 23:57:41 +0300 (MSK) (envelope-from dima@tejblum.pp.ru) Message-Id: <199911062057.XAA03228@tejblum.pp.ru> X-Mailer: exmh version 2.0gamma 1/27/96 To: Brian Fundakowski Feldman Cc: Dmitrij Tejblum , "FreeBSD Current Users' list" From: Dmitrij Tejblum Subject: Re: Serious locking problem in CURRENT In-reply-to: Your message of "Sat, 06 Nov 1999 14:25:50 EST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 06 Nov 1999 23:57:40 +0300 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Brian Fundakowski Feldman wrote: > There were zero comments about what order things happen in; in fact, > the ordering in this case is Just Plain Lame (TM). It's much more > correct to explicitly check for fp->f_count == 1. Not sure what you mean. The commit clearly states that POSIX and BSD locking intentionally handled in different ways here. Frankly, I see nothing lame in the ordering. The second VOP_ADVLOCK just should be moved to fdrop(). > > BTW, I have another little concern with that commit: It make possible for > > last close() of a file descriptor to return 0 instead of the error from > > VOP_CLOSE(), and the error from VOP_CLOSE() to be ignored. When a process do closef() on a descriptor "held" by another process (by fhold(), e.g. the process do read() on the descriptor), it will just return 0 without the call to fo_close(). Then, when the other process drop the descriptor, fdrop() call fo_close() but the error is thrown away. No? Dima To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message