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@
This commit is contained in:
martin 2019-08-29 16:26:46 +00:00
parent 1516688a86
commit 91ce1d544d
1 changed files with 3 additions and 3 deletions

View File

@ -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_cred_t cred,
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));