diff options
author | julian <julian@FreeBSD.org> | 1998-07-04 00:27:48 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1998-07-04 00:27:48 +0000 |
commit | 7af268b85d2a6445b4292c10922f57e40881067d (patch) | |
tree | aed1828f1e4fc5c6a7db08e633e2bd03693c0c3f /sys/dev/vn | |
parent | aa2b943c83f01a026e578e26a97c95062ef93fa1 (diff) | |
download | FreeBSD-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/dev/vn')
-rw-r--r-- | sys/dev/vn/vn.c | 6 |
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; |