summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>1999-08-25 17:08:20 +0000
committerbouyer <bouyer@NetBSD.org>1999-08-25 17:08:20 +0000
commitd6c3ef56b493885b4c8f2fbb3d60ab7def88fe8a (patch)
tree82f18328e6e76b19378d4bc22f15675181f857db /sys/dev
parent2df1b7b51079162e31cdbab0fef88c65c9875e07 (diff)
Guard pool_get()/pool_put() with splbio()/splx(). Fix kern/8245.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/wdc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c
index 5cad6b42d29..e2e44eb80ad 100644
--- a/sys/dev/ic/wdc.c
+++ b/sys/dev/ic/wdc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wdc.c,v 1.71 1999/08/09 09:55:18 bouyer Exp $ */
+/* $NetBSD: wdc.c,v 1.72 1999/08/25 17:08:20 bouyer Exp $ */
/*
@@ -1281,9 +1281,12 @@ wdc_get_xfer(flags)
int flags;
{
struct wdc_xfer *xfer;
+ int s;
+ s = splbio();
xfer = pool_get(&wdc_xfer_pool,
((flags & WDC_NOSLEEP) != 0 ? PR_NOWAIT : PR_WAITOK));
+ splx(s);
memset(xfer, 0, sizeof(struct wdc_xfer));
return xfer;
}
@@ -1301,8 +1304,8 @@ wdc_free_xfer(chp, xfer)
s = splbio();
chp->ch_flags &= ~WDCF_ACTIVE;
TAILQ_REMOVE(&chp->ch_queue->sc_xfer, xfer, c_xferchain);
- splx(s);
pool_put(&wdc_xfer_pool, xfer);
+ splx(s);
}
static void