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.
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to