Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Apr 2013 09:59:38 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r248969 - head/sys/kern
Message-ID:  <201304010959.r319xc5L015746@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Apr  1 09:59:38 2013
New Revision: 248969
URL: http://svnweb.freebsd.org/changeset/base/248969

Log:
  Do not call the VOP_LOOKUP() for the doomed directory vnode.  The
  vnode could be reclaimed while lock upgrade was performed.
  
  Sponsored by:	The FreeBSD Foundation
  Reported and tested by:	pho
  Diagnosed and reviewed by:	rmacklem
  MFC after:	1 week

Modified:
  head/sys/kern/vfs_lookup.c

Modified: head/sys/kern/vfs_lookup.c
==============================================================================
--- head/sys/kern/vfs_lookup.c	Mon Apr  1 09:57:46 2013	(r248968)
+++ head/sys/kern/vfs_lookup.c	Mon Apr  1 09:59:38 2013	(r248969)
@@ -698,6 +698,10 @@ unionlookup:
 	    VOP_ISLOCKED(dp) == LK_SHARED &&
 	    (cnp->cn_flags & ISLASTCN) && (cnp->cn_flags & LOCKPARENT))
 		vn_lock(dp, LK_UPGRADE|LK_RETRY);
+	if ((dp->v_iflag & VI_DOOMED) != 0) {
+		error = ENOENT;
+		goto bad;
+	}
 	/*
 	 * If we're looking up the last component and we need an exclusive
 	 * lock, adjust our lkflags.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304010959.r319xc5L015746>