Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/puffs Make sure that pa_spare is zero-filled and does...
details: https://anonhg.NetBSD.org/src/rev/183cbf045d82
branches: trunk
changeset: 756077:183cbf045d82
user: pooka <pooka%NetBSD.org@localhost>
date: Tue Jul 06 12:05:18 2010 +0000
description:
Make sure that pa_spare is zero-filled and does not contain any
garbage which might disrupt future use.
diffstat:
sys/fs/puffs/puffs_vfsops.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 2aea8bf1eaf1 -r 183cbf045d82 sys/fs/puffs/puffs_vfsops.c
--- a/sys/fs/puffs/puffs_vfsops.c Tue Jul 06 11:56:20 2010 +0000
+++ b/sys/fs/puffs/puffs_vfsops.c Tue Jul 06 12:05:18 2010 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index