Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/sysvbfs Initialize *vpp to NULL: relookup() requires ...
details: https://anonhg.NetBSD.org/src/rev/ec1da258ae44
branches: trunk
changeset: 755183:ec1da258ae44
user: pooka <pooka%NetBSD.org@localhost>
date: Wed May 26 17:52:35 2010 +0000
description:
Initialize *vpp to NULL: relookup() requires it without initializing
the value before the call (yea, changing relookup would probably
be smart, but other file systems already initialize vpp, so I'm
letting someone else experiment with tylenol od).
diffstat:
sys/fs/sysvbfs/sysvbfs_vnops.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (33 lines):
diff -r 6bfc15e5fa10 -r ec1da258ae44 sys/fs/sysvbfs/sysvbfs_vnops.c
--- a/sys/fs/sysvbfs/sysvbfs_vnops.c Wed May 26 17:38:29 2010 +0000
+++ b/sys/fs/sysvbfs/sysvbfs_vnops.c Wed May 26 17:52:35 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysvbfs_vnops.c,v 1.26 2010/01/08 11:35:09 pooka Exp $ */
+/* $NetBSD: sysvbfs_vnops.c,v 1.27 2010/05/26 17:52:35 pooka Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.26 2010/01/08 11:35:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.27 2010/05/26 17:52:35 pooka Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -83,12 +83,13 @@
DPRINTF("%s: %s op=%d %d\n", __func__, name, nameiop,
cnp->cn_flags);
+ *a->a_vpp = NULL;
+
KASSERT((cnp->cn_flags & ISDOTDOT) == 0);
if ((error = VOP_ACCESS(a->a_dvp, VEXEC, cnp->cn_cred)) != 0) {
return error; /* directory permittion. */
}
-
if (namelen == 1 && name[0] == '.') { /* "." */
vref(v);
*a->a_vpp = v;
Home |
Main Index |
Thread Index |
Old Index