From owner-freebsd-hackers Thu Oct 23 10:58:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA14711 for hackers-outgoing; Thu, 23 Oct 1997 10:58:15 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from lestat.nas.nasa.gov (lestat.nas.nasa.gov [129.99.50.29]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA14705 for ; Thu, 23 Oct 1997 10:58:14 -0700 (PDT) (envelope-from thorpej@lestat.nas.nasa.gov) Received: from localhost (localhost [127.0.0.1]) by lestat.nas.nasa.gov (8.8.7/8.6.12) with SMTP id KAA04569; Thu, 23 Oct 1997 10:56:21 -0700 (PDT) Message-Id: <199710231756.KAA04569@lestat.nas.nasa.gov> X-Authentication-Warning: lestat.nas.nasa.gov: localhost [127.0.0.1] didn't use HELO protocol To: Terry Lambert Cc: dk+@ua.net, freebsd-hackers@freebsd.org Subject: Re: Possible SERIOUS bug in open()? Reply-To: Jason Thorpe From: Jason Thorpe Date: Thu, 23 Oct 1997 10:56:17 -0700 Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Thu, 23 Oct 1997 17:31:02 +0000 (GMT) Terry Lambert wrote: > I need to hold a reference. The "lock against eject" operation is > a side effect of an existing reference forcing the count over 1 for > the device in question. > > So the short answer is "to obtain reference side effects without > granting read/write access on the descriptor". I think "open for not read not write" is a silly way to do this, personally. If you want to add/delete "artificial references", then invent a real interface for it, don't use a hack like open with non-sensical flags. Jason R. Thorpe thorpej@nas.nasa.gov NASA Ames Research Center Home: +1 408 866 1912 NAS: M/S 258-6 Work: +1 415 604 0935 Moffett Field, CA 94035 Pager: +1 415 428 6939