Module Name:    src
Committed By:   snj
Date:           Mon Jan 11 00:02:09 UTC 2010

Modified Files:
        src/sys/kern [netbsd-5]: vfs_subr.c

Log Message:
Pull up following revision(s) (requested by pooka in ticket #1226):
        sys/kern/vfs_subr.c: revision 1.393
Make sure struct vattr contains no random bits of kernel memory
after vattr_null().  This is especially nice considering things
like puffs, where the contents are copied to userspace.


To generate a diff of this commit:
cvs rdiff -u -r1.357.4.8 -r1.357.4.9 src/sys/kern/vfs_subr.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/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.357.4.8 src/sys/kern/vfs_subr.c:1.357.4.9
--- src/sys/kern/vfs_subr.c:1.357.4.8	Sat Nov 28 18:59:11 2009
+++ src/sys/kern/vfs_subr.c	Mon Jan 11 00:02:09 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.357.4.8 2009/11/28 18:59:11 sborrill Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.357.4.9 2010/01/11 00:02:09 snj Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.357.4.8 2009/11/28 18:59:11 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.357.4.9 2010/01/11 00:02:09 snj Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -2546,6 +2546,8 @@
 vattr_null(struct vattr *vap)
 {
 
+	memset(vap, 0, sizeof(*vap));
+
 	vap->va_type = VNON;
 
 	/*
@@ -2572,7 +2574,6 @@
 	vap->va_flags = VNOVAL;
 	vap->va_rdev = VNOVAL;
 	vap->va_bytes = VNOVAL;
-	vap->va_vaflags = 0;
 }
 
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))

Reply via email to