Date: Mon, 25 Oct 2010 06:16:27 +0000 (UTC) From: Kevin Lo <kevlo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r214316 - stable/8/sys/fs/msdosfs Message-ID: <201010250616.o9P6GR5R052894@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevlo Date: Mon Oct 25 06:16:27 2010 New Revision: 214316 URL: http://svn.freebsd.org/changeset/base/214316 Log: MFC r214001: Fix a possible, but very unlikely race where the directory dirent is moved to the location that was used by ".." entry. Modified: stable/8/sys/fs/msdosfs/msdosfs_lookup.c Modified: stable/8/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- stable/8/sys/fs/msdosfs/msdosfs_lookup.c Mon Oct 25 05:37:12 2010 (r214315) +++ stable/8/sys/fs/msdosfs/msdosfs_lookup.c Mon Oct 25 06:16:27 2010 (r214316) @@ -594,10 +594,15 @@ msdosfs_deget_dotdot(struct vnode *vp, u vfs_unbusy(mp); if (error == 0) *rvp = DETOV(rdp); - vn_lock(vp, ltype | LK_RETRY); + if (*rvp != vp) + vn_lock(vp, ltype | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { - if (error == 0) - vput(*rvp); + if (error == 0) { + if (*rvp == vp) + vunref(*rvp); + else + vput(*rvp); + } error = ENOENT; } return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010250616.o9P6GR5R052894>