Module Name: src
Committed By: pooka
Date: Tue Jul 6 12:05:18 UTC 2010
Modified Files:
src/sys/fs/puffs: puffs_vfsops.c
Log Message:
Make sure that pa_spare is zero-filled and does not contain any
garbage which might disrupt future use.
To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/fs/puffs/puffs_vfsops.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/puffs/puffs_vfsops.c
diff -u src/sys/fs/puffs/puffs_vfsops.c:1.90 src/sys/fs/puffs/puffs_vfsops.c:1.91
--- src/sys/fs/puffs/puffs_vfsops.c:1.90 Thu Jun 24 13:03:10 2010
+++ src/sys/fs/puffs/puffs_vfsops.c Tue Jul 6 12:05:18 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vfsops.c,v 1.90 2010/06/24 13:03:10 hannken Exp $ */
+/* $NetBSD: puffs_vfsops.c,v 1.91 2010/07/06 12:05:18 pooka Exp $ */
/*
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.90 2010/06/24 13:03:10 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.91 2010/07/06 12:05:18 pooka Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -129,6 +129,15 @@
goto out;
}
+ for (i = 0; i < __arraycount(args->pa_spare); i++) {
+ if (args->pa_spare[i] != 0) {
+ printf("puffs_mount: pa_spare[%d] = 0x%x\n",
+ i, args->pa_spare[i]);
+ error = EINVAL;
+ goto out;
+ }
+ }
+
/* use dummy value for passthrough */
if (args->pa_fhflags & PUFFS_FHFLAG_PASSTHROUGH)
args->pa_fhsize = sizeof(struct fid);