From owner-cvs-all@FreeBSD.ORG Fri Jun 17 06:49:27 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD4FC16A41C; Fri, 17 Jun 2005 06:49:27 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FB5843D1F; Fri, 17 Jun 2005 06:49:27 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (obrien@localhost [127.0.0.1]) by dragon.NUXI.org (8.13.4/8.13.4) with ESMTP id j5H6nRpC003690; Thu, 16 Jun 2005 23:49:27 -0700 (PDT) (envelope-from obrien@dragon.NUXI.org) Received: (from obrien@localhost) by dragon.NUXI.org (8.13.4/8.13.1/Submit) id j5H6nRjk003689; Thu, 16 Jun 2005 23:49:27 -0700 (PDT) (envelope-from obrien) Date: Thu, 16 Jun 2005 23:49:27 -0700 From: "David O'Brien" To: Jeff Roberson Message-ID: <20050617064927.GA948@dragon.NUXI.org> References: <200506170105.j5H15EhR075282@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200506170105.j5H15EhR075282@repoman.freebsd.org> X-Operating-System: FreeBSD 6.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_cache.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2005 06:49:27 -0000 On Fri, Jun 17, 2005 at 01:05:13AM +0000, Jeff Roberson wrote: > Log: > - Fix a leaked reference to a vnode via v_dd. We rely on cache_purge() and > cache_zap() to clear the v_dd pointers when a directory vnode is forcibly > discarded. For this to work, all vnodes with v_dd pointers to a directory > must also have name cache entries linked via v_cache_dst to that dvp > otherwise we could not find them at cache_purge() time. The following > code snipit could break this guarantee by unlinking a directory before > fetching it's dotdot. The dotdot lookup would initialize the v_dd field > of the unlinked directory which could never be cleared. To fix this > we don't initialize v_dd for orphaned vnodes. > printf("rmdir: %d\n", rmdir("../foo")); /* foo is cwd */ > printf("chdir: %d\n", chdir("..")); > printf("%s\n", getwd(NULL)); > > Discovered by: kkenn Isn't this the same bug Peter discovered back in April at USENIX (via Kmail). I thought this bug was fixed. -- -- David (obrien@FreeBSD.org)