Module Name: src Committed By: pooka Date: Wed May 26 17:52:36 UTC 2010
Modified Files: src/sys/fs/sysvbfs: sysvbfs_vnops.c Log Message: 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). To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/fs/sysvbfs/sysvbfs_vnops.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/sysvbfs/sysvbfs_vnops.c diff -u src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.26 src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.27 --- src/sys/fs/sysvbfs/sysvbfs_vnops.c:1.26 Fri Jan 8 11:35:09 2010 +++ src/sys/fs/sysvbfs/sysvbfs_vnops.c Wed May 26 17:52:35 2010 @@ -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;