summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-07-04 00:27:48 +0000
committerjulian <julian@FreeBSD.org>1998-07-04 00:27:48 +0000
commit7af268b85d2a6445b4292c10922f57e40881067d (patch)
treeaed1828f1e4fc5c6a7db08e633e2bd03693c0c3f /sys
parentaa2b943c83f01a026e578e26a97c95062ef93fa1 (diff)
downloadFreeBSD-src-7af268b85d2a6445b4292c10922f57e40881067d.zip
FreeBSD-src-7af268b85d2a6445b4292c10922f57e40881067d.tar.gz
Don't use a struct buf (malloc'd) without first initialising all the fields
to some known value! (probable cause of soft updates exploding with vn devices)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/vn/vn.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index de82505..4370689 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -38,7 +38,7 @@
* from: Utah Hdr: vn.c 1.13 94/04/02
*
* from: @(#)vn.c 8.6 (Berkeley) 4/1/94
- * $Id: vn.c,v 1.60 1998/06/07 17:09:50 dfr Exp $
+ * $Id: vn.c,v 1.61 1998/06/07 20:10:53 dfr Exp $
*/
/*
@@ -327,6 +327,8 @@ vnstrategy(struct buf *bp)
struct buf *nbp;
nbp = getvnbuf();
+ bzero(nbp, sizeof(struct buf));
+ LIST_INIT(&nbp->b_dep);
byten = dbtob(bn);
bsize = vn->sc_vp->v_mount->mnt_stat.f_iosize;
addr = bp->b_data;
@@ -497,6 +499,8 @@ nvsIOreq(void *private ,struct buf *bp)
struct buf *nbp;
nbp = getvnbuf();
+ bzero(nbp, sizeof(struct buf));
+ LIST_INIT(&nbp->b_dep);
byten = dbtob(bn);
/* This is probably the only time this is RIGHT */
bsize = vn->sc_vp->v_mount->mnt_stat.f_iosize;
OpenPOWER on IntegriCloud