From owner-svn-src-all@FreeBSD.ORG Fri Mar 23 21:59:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D730106564A; Fri, 23 Mar 2012 21:59:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from zimbra.averesystems.com (75-149-8-245-Pennsylvania.hfc.comcastbusiness.net [75.149.8.245]) by mx1.freebsd.org (Postfix) with ESMTP id 183E18FC12; Fri, 23 Mar 2012 21:59:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.averesystems.com (Postfix) with ESMTP id 1E513446002; Fri, 23 Mar 2012 17:59:54 -0400 (EDT) X-Virus-Scanned: amavisd-new at averesystems.com Received: from zimbra.averesystems.com ([127.0.0.1]) by localhost (zimbra.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kzfnc5ZIRFBI; Fri, 23 Mar 2012 17:59:50 -0400 (EDT) Received: from hqrouter.arriad.com (vm.arriad.com [10.0.1.251]) by zimbra.averesystems.com (Postfix) with ESMTP id 96D0A44600A; Fri, 23 Mar 2012 17:59:46 -0400 (EDT) X-Mailbox-Line: From owner-svn-src-stable-8@freebsd.org Fri Mar 23 14:30:24 2012 X-Original-To: aboyer@averesystems.com Delivered-To: aboyer@averesystems.com Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by zimbra.averesystems.com (Postfix) with ESMTP id 51CCC20099 for ; Fri, 23 Mar 2012 14:30:24 -0400 (EDT) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 844FB1A9051; Fri, 23 Mar 2012 18:29:46 +0000 (UTC) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 651341065678; Fri, 23 Mar 2012 18:29:46 +0000 (UTC) (envelope-from owner-svn-src-stable-8@freebsd.org) Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F419C106566B; Fri, 23 Mar 2012 18:29:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C50598FC12; Fri, 23 Mar 2012 18:29:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2NITSai088800; Fri, 23 Mar 2012 18:29:28 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2NITSti088797; Fri, 23 Mar 2012 18:29:28 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201203231829.q2NITSti088797@svn.freebsd.org> From: John Baldwin Date: Fri, 23 Mar 2012 18:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-svn-src-stable-8@freebsd.org Errors-To: owner-svn-src-stable-8@freebsd.org Cc: Subject: svn commit: r233386 - in stable/8/sys: fs/tmpfs i386/conf ufs/ufs X-BeenThere: svn-src-all@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2012 21:59:55 -0000 Author: jhb Date: Fri Mar 23 18:29:28 2012 New Revision: 233386 URL: http://svn.freebsd.org/changeset/base/233386 Log: MFC 232401: Similar to the fixes in 226967 and 226987, purge any name cache entries associated with the previous vnode (if any) associated with the target of a rename(). Otherwise, a lookup of the target pathname concurrent with a rename() could re-add a name cache entry after the namei(RENAME) lookup in kern_renameat() had purged the target pathname. Modified: stable/8/sys/fs/tmpfs/tmpfs_vnops.c stable/8/sys/ufs/ufs/ufs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/boot/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/e1000/ (props changed) stable/8/sys/i386/conf/XENHVM (props changed) Modified: stable/8/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/8/sys/fs/tmpfs/tmpfs_vnops.c Fri Mar 23 18:29:09 2012 (r233385) +++ stable/8/sys/fs/tmpfs/tmpfs_vnops.c Fri Mar 23 18:29:28 2012 (r233386) @@ -1072,6 +1072,8 @@ tmpfs_rename(struct vop_rename_args *v) tmpfs_free_dirent(VFS_TO_TMPFS(tvp->v_mount), de, TRUE); } cache_purge(fvp); + if (tvp != NULL) + cache_purge(tvp); error = 0; Modified: stable/8/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- stable/8/sys/ufs/ufs/ufs_vnops.c Fri Mar 23 18:29:09 2012 (r233385) +++ stable/8/sys/ufs/ufs/ufs_vnops.c Fri Mar 23 18:29:28 2012 (r233386) @@ -1527,8 +1527,15 @@ relock: * 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. + * + * The same issue also applies to tvp if it exists as + * otherwise we may have a stale name cache entry for the new + * name that references the old i-node if it has other links + * or open file descriptors. */ cache_purge(fvp); + if (tvp) + cache_purge(tvp); unlockout: vput(fdvp); _______________________________________________ svn-src-stable-8@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable-8 To unsubscribe, send any mail to "svn-src-stable-8-unsubscribe@freebsd.org"