From owner-svn-src-head@FreeBSD.ORG Fri Jun 19 07:25:16 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8B21757; Fri, 19 Jun 2015 07:25:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6FD77B9; Fri, 19 Jun 2015 07:25:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5J7PGLc056984; Fri, 19 Jun 2015 07:25:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5J7PG24056983; Fri, 19 Jun 2015 07:25:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201506190725.t5J7PG24056983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 19 Jun 2015 07:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284594 - head/sys/fs/tmpfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 07:25:16 -0000 Author: kib Date: Fri Jun 19 07:25:15 2015 New Revision: 284594 URL: https://svnweb.freebsd.org/changeset/base/284594 Log: Restore the td_cookie value for the tmpfs directory entry which was a dup entry, upon detach from the parent directory. If the node is renamed, the entry is re-attached at the different directory, and invalud cookie value triggers assert (or corrupts directory rb tree, it seems). Reported by: clusteradm (gjb, antoine) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Fri Jun 19 06:58:05 2015 (r284593) +++ head/sys/fs/tmpfs/tmpfs_subr.c Fri Jun 19 07:25:15 2015 (r284594) @@ -1031,6 +1031,7 @@ tmpfs_dir_detach(struct vnode *vp, struc tmpfs_free_dirent(tmp, xde); } } + de->td_cookie = de->td_hash; } else RB_REMOVE(tmpfs_dir, head, de);