From owner-freebsd-hackers Wed Nov 13 17:57:54 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7881E37B401 for ; Wed, 13 Nov 2002 17:57:53 -0800 (PST) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1319243EC2 for ; Wed, 13 Nov 2002 17:57:53 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0374.cvx22-bradley.dialup.earthlink.net ([209.179.199.119] helo=mindspring.com) by scaup.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18C9GK-0000xC-00; Wed, 13 Nov 2002 17:57:45 -0800 Message-ID: <3DD302A1.2187A86D@mindspring.com> Date: Wed, 13 Nov 2002 17:55:45 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Pawel Jakub Dawidek Cc: freebsd-hackers@freebsd.org Subject: Re: Shared files within a jail References: <20021113030847.69266.qmail@web12801.mail.yahoo.com> <20021113112325.GK590@garage.freebsd.pl> <3DD2E016.7862490@mindspring.com> <20021113234904.GM590@garage.freebsd.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Pawel Jakub Dawidek wrote: > On Wed, Nov 13, 2002 at 03:28:22PM -0800, Terry Lambert wrote: > +> Don't worry about it. It's only a problem for mmap'ed files > +> which are also read/written. Sheesh. > > I have found one little bug in nullfs. I've send it some time ago > to hackers@, but without any respond. __getcwd(2) doesn't work like you think it works. It works by looking up things in the directory name cache. It's perfectly acceptable for it to fail. This is why you are supposed t use getcwd(3), instead, which can recover if the system call fails. Realize that directories do not have necessarily valid parent pointers hanging around. By overloading the lookup cache, I can cause your program to fail on NFS, as well, You just aren't waving the right dead chicken in your test case. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message