Module Name:    src
Committed By:   martin
Date:           Thu Aug 29 16:26:46 UTC 2019

Modified Files:
        src/sys/fs/tmpfs [netbsd-8]: tmpfs_rename.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1345):

        sys/fs/tmpfs/tmpfs_rename.c: revision 1.9

Fix uninitialized variable: if 'tvp' is NULL, '*tdep' is not initialized.

This could have caused the KASSERT to wrongfully fire.

ok riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.10.1 src/sys/fs/tmpfs/tmpfs_rename.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/tmpfs/tmpfs_rename.c
diff -u src/sys/fs/tmpfs/tmpfs_rename.c:1.8 src/sys/fs/tmpfs/tmpfs_rename.c:1.8.10.1
--- src/sys/fs/tmpfs/tmpfs_rename.c:1.8	Mon Jul  6 10:24:59 2015
+++ src/sys/fs/tmpfs/tmpfs_rename.c	Thu Aug 29 16:26:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tmpfs_rename.c,v 1.8 2015/07/06 10:24:59 wiz Exp $	*/
+/*	$NetBSD: tmpfs_rename.c,v 1.8.10.1 2019/08/29 16:26:46 martin Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_rename.c,v 1.8 2015/07/06 10:24:59 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_rename.c,v 1.8.10.1 2019/08/29 16:26:46 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/errno.h>
@@ -282,7 +282,7 @@ tmpfs_gro_rename(struct mount *mp, kauth
 	KASSERT(tcnp != NULL);
 	KASSERT(tdep != NULL);
 	KASSERT(fdep != tdep);
-	KASSERT((*fdep) != (*tdep));
+	KASSERT((tvp == NULL) || (*fdep) != (*tdep));
 	KASSERT((*fdep) != NULL);
 	KASSERT((*fdep)->td_node == VP_TO_TMPFS_NODE(fvp));
 	KASSERT((tvp == NULL) || ((*tdep) != NULL));

Reply via email to