From owner-cvs-all Sat Feb 2 11:22:15 2002 Delivered-To: cvs-all@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 3D73A37B402; Sat, 2 Feb 2002 11:22:06 -0800 (PST) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 19E6B5341; Sat, 2 Feb 2002 20:22:04 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Kirk McKusick Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c References: <200202020149.g121nJI67647@freefall.freebsd.org> From: Dag-Erling Smorgrav Date: 02 Feb 2002 20:22:04 +0100 In-Reply-To: <200202020149.g121nJI67647@freefall.freebsd.org> Message-ID: Lines: 21 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Kirk McKusick writes: > Log: > In the routines vrele() and vput(), we must lock the vnode and > call VOP_INACTIVE before placing the vnode back on the free list. > Otherwise there is a race condition on SMP machines between > getnewvnode() locking the vnode to reclaim it and vrele() > locking the vnode to inactivate it. This window of vulnerability > becomes exaggerated in the presence of filesystems that have > been suspended as the inactive routine may need to temporarily > release the lock on the vnode to avoid deadlock with the syncer > process. I think this might be the cause of the panic some people saw in procfs a couple of months ago; getvnode() would sometimes return a vnode that had already been reclaimed, and fstatfs() would dereference a NULL pointer. This was "fixed" by adding an extra check to fstatfs() in rev 1.216 of vfs_syscalls.c; this check is probably unnecessary now. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message