summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorpho <pho@FreeBSD.org>2011-10-31 15:01:47 +0000
committerpho <pho@FreeBSD.org>2011-10-31 15:01:47 +0000
commitf11a5665c1ce07407e300f998229993c62f2c9d2 (patch)
treeedbe7b5dbb11572bbbab78d3fa267bd51c5c90d8 /sys/ufs
parentf151da3d717bcdd505faed05807738fee15f8609 (diff)
downloadFreeBSD-src-f11a5665c1ce07407e300f998229993c62f2c9d2.zip
FreeBSD-src-f11a5665c1ce07407e300f998229993c62f2c9d2.tar.gz
The kern_renameat() looks up the fvp using the DELETE flag, which causes
the removal of the name cache entry for fvp. Reported by: Anton Yuzhaninov <citrin citrin ru> In collaboration with: kib MFC after: 1 week
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_vnops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 733413d..105bdaf 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -1519,6 +1519,13 @@ relock:
cache_purge(fdvp);
}
error = ufs_dirremove(fdvp, fip, fcnp->cn_flags, 0);
+ /*
+ * As the relookup of the fvp is done in two steps:
+ * ufs_lookup_ino() and then VFS_VGET(), another thread might do a
+ * normal lookup of the from name just before the VFS_VGET() call,
+ * causing the cache entry to be re-instantiated.
+ */
+ cache_purge(fvp);
unlockout:
vput(fdvp);
OpenPOWER on IntegriCloud