Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Guard pool_get()/pool_put() with splbio()/splx()....



details:   https://anonhg.NetBSD.org/src/rev/c06c80540999
branches:  trunk
changeset: 475787:c06c80540999
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Aug 25 17:08:20 1999 +0000

description:
Guard pool_get()/pool_put() with splbio()/splx(). Fix kern/8245.

diffstat:

 sys/dev/ic/wdc.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 20226c64846b -r c06c80540999 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Wed Aug 25 16:28:41 1999 +0000
+++ b/sys/dev/ic/wdc.c  Wed Aug 25 17:08:20 1999 +0000
@@ -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 @@
        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 @@
        s = splbio();
        chp->ch_flags &= ~WDCF_ACTIVE;
        TAILQ_REMOVE(&chp->ch_queue->sc_xfer, xfer, c_xferchain);
+       pool_put(&wdc_xfer_pool, xfer);
        splx(s);
-       pool_put(&wdc_xfer_pool, xfer);
 }
 
 static void



Home | Main Index | Thread Index | Old Index