From 966a1b86f896f6f789ab7cd1f188d5a15945b885 Mon Sep 17 00:00:00 2001 From: chs Date: Tue, 29 May 2001 23:08:06 +0000 Subject: [PATCH] initialize the b_dep field in malloc()'d buffers. fixes PR 13065. --- sys/arch/hp300/dev/sd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/arch/hp300/dev/sd.c b/sys/arch/hp300/dev/sd.c index 5656d7ce4e10..a5043f3de14a 100644 --- a/sys/arch/hp300/dev/sd.c +++ b/sys/arch/hp300/dev/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.44 2000/10/10 19:58:43 he Exp $ */ +/* $NetBSD: sd.c,v 1.45 2001/05/29 23:08:06 chs Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -363,6 +363,7 @@ sdgetcapacity(sc, dev) bp->b_flags = B_READ | B_BUSY; bp->b_data = (caddr_t)capbuf; bp->b_bcount = capbufsize; + LIST_INIT(&bp->b_dep); sdstrategy(bp); i = biowait(bp) ? sc->sc_sensestore.status : 0; free(bp, M_DEVBUF); @@ -657,6 +658,7 @@ sdlblkstrat(bp, bsize) cbp->b_blkno = bn - btodb(boff); cbp->b_data = cbuf; cbp->b_bcount = bsize; + LIST_INIT(&cbp->b_dep); #ifdef DEBUG if (sddebug & SDB_PARTIAL) printf(" readahead: bn %x cnt %x off %x addr %p\n", @@ -691,6 +693,7 @@ sdlblkstrat(bp, bsize) #endif } cbp->b_flags = B_BUSY | B_PHYS | (bp->b_flags & B_READ); + LIST_INIT(&cbp->b_dep); sdstrategy(cbp); biowait(cbp); if (cbp->b_flags & B_ERROR) {