Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/puffs replace variable stack declaration with a large...
details: https://anonhg.NetBSD.org/src/rev/aed35df30451
branches: trunk
changeset: 346613:aed35df30451
user: christos <christos%NetBSD.org@localhost>
date: Thu Jul 21 18:21:27 2016 +0000
description:
replace variable stack declaration with a large enough one and KASSERT.
diffstat:
sys/fs/puffs/puffs_vnops.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 7b7d6c4135d9 -r aed35df30451 sys/fs/puffs/puffs_vnops.c
--- a/sys/fs/puffs/puffs_vnops.c Thu Jul 21 18:10:47 2016 +0000
+++ b/sys/fs/puffs/puffs_vnops.c Thu Jul 21 18:21:27 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: puffs_vnops.c,v 1.204 2016/07/07 06:55:42 msaitoh Exp $ */
+/* $NetBSD: puffs_vnops.c,v 1.205 2016/07/21 18:21:27 christos Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.204 2016/07/07 06:55:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.205 2016/07/21 18:21:27 christos Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -1147,7 +1147,7 @@
static void
zerofill_lastpage(struct vnode *vp, voff_t off)
{
- char zbuf[PAGE_SIZE];
+ char zbuf[16384];
struct iovec iov;
struct uio uio;
vsize_t len;
@@ -1160,6 +1160,7 @@
return;
len = round_page(off) - off;
+ KASSERT(len < sizeof(zbuf));
memset(zbuf, 0, len);
iov.iov_base = zbuf;
Home |
Main Index |
Thread Index |
Old Index