summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-11-18 00:16:49 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-11-18 00:16:49 +0000
commit46cc8afc8bf049d192375852f2255ca6acb93b21 (patch)
tree98ab444c18eb1c58f900e4494271870b2e9c03cb /sys/arch/hp300/dev
parent31b0d766e88d40f0ba613dffb70b4565626d1c9a (diff)
Protect biodone() with splbio().
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r--sys/arch/hp300/dev/ct.c5
-rw-r--r--sys/arch/hp300/dev/hd.c5
-rw-r--r--sys/arch/hp300/dev/mt.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/sys/arch/hp300/dev/ct.c b/sys/arch/hp300/dev/ct.c
index 3dbd363c8a3..4e1b4b1bfcf 100644
--- a/sys/arch/hp300/dev/ct.c
+++ b/sys/arch/hp300/dev/ct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ct.c,v 1.13 2005/11/18 00:09:15 miod Exp $ */
+/* $OpenBSD: ct.c,v 1.14 2005/11/18 00:16:48 miod Exp $ */
/* $NetBSD: ct.c,v 1.21 1997/04/02 22:37:23 scottr Exp $ */
/*
@@ -843,13 +843,16 @@ ctdone(sc, bp)
struct buf *bp;
{
struct buf *dp;
+ int s;
if ((dp = bp->b_actf) != NULL)
dp->b_actb = bp->b_actb;
else
sc->sc_tab.b_actb = bp->b_actb;
*bp->b_actb = dp;
+ s = splbio();
biodone(bp);
+ splx(s);
hpibfree(sc->sc_dev.dv_parent, &sc->sc_hq);
if (sc->sc_tab.b_actf == NULL) {
sc->sc_tab.b_active = 0;
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c
index 620e792bd94..74ca2a1e0af 100644
--- a/sys/arch/hp300/dev/hd.c
+++ b/sys/arch/hp300/dev/hd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hd.c,v 1.36 2005/11/18 00:09:15 miod Exp $ */
+/* $OpenBSD: hd.c,v 1.37 2005/11/18 00:16:48 miod Exp $ */
/* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */
/*
@@ -738,11 +738,14 @@ hdfinish(rs, bp)
struct buf *bp;
{
struct buf *dp = &rs->sc_tab;
+ int s;
dp->b_errcnt = 0;
dp->b_actf = bp->b_actf;
bp->b_resid = 0;
+ s = splbio();
biodone(bp);
+ splx(s);
hpibfree(rs->sc_dev.dv_parent, &rs->sc_hq);
if (dp->b_actf)
return (dp->b_actf);
diff --git a/sys/arch/hp300/dev/mt.c b/sys/arch/hp300/dev/mt.c
index 338f818afc0..34a614e9678 100644
--- a/sys/arch/hp300/dev/mt.c
+++ b/sys/arch/hp300/dev/mt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mt.c,v 1.14 2005/11/16 21:23:55 miod Exp $ */
+/* $OpenBSD: mt.c,v 1.15 2005/11/18 00:16:48 miod Exp $ */
/* $NetBSD: mt.c,v 1.8 1997/03/31 07:37:29 scottr Exp $ */
/*
@@ -533,6 +533,7 @@ mtstart(arg)
struct buf *bp, *dp;
short cmdcount = 1;
u_char cmdbuf[2];
+ int s;
dlog(LOG_DEBUG, "%s start", sc->sc_dev.dv_xname);
sc->sc_flags &= ~MTF_WRT;
@@ -715,7 +716,9 @@ errdone:
bp->b_flags |= B_ERROR;
done:
sc->sc_flags &= ~(MTF_HITEOF | MTF_HITBOF);
+ s = splbio();
biodone(bp);
+ splx(s);
if ((dp = bp->b_actf))
dp->b_actb = bp->b_actb;
else