Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vax Protect biodone() with spl7(). Found by art...



details:   https://anonhg.NetBSD.org/src/rev/2dc9e6f6904a
branches:  trunk
changeset: 533476:2dc9e6f6904a
user:      ragge <ragge%NetBSD.org@localhost>
date:      Mon Jul 01 16:20:35 2002 +0000

description:
Protect biodone() with spl7(). Found by art@openbsd, but fixed in the
wrong way.

diffstat:

 sys/arch/vax/vax/ctu.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 05bba9074db7 -r 2dc9e6f6904a sys/arch/vax/vax/ctu.c
--- a/sys/arch/vax/vax/ctu.c    Mon Jul 01 16:16:37 2002 +0000
+++ b/sys/arch/vax/vax/ctu.c    Mon Jul 01 16:20:35 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ctu.c,v 1.14 2001/05/14 14:43:45 ragge Exp $ */
+/*     $NetBSD: ctu.c,v 1.15 2002/07/01 16:20:35 ragge Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -177,12 +177,14 @@
        printf("ctustrategy: bcount %ld blkno %d\n", bp->b_bcount, bp->b_blkno);
        printf("ctustrategy: bp %p\n", bp);
 #endif
+       s = spl7();
        if (bp->b_blkno >= 512) {
                bp->b_resid = bp->b_bcount;
-               return biodone(bp);
+               biodone(bp);
+               splx(s);
+               return;
        }
 
-       s = spl7();
        empty = TAILQ_EMPTY(&tu_sc.sc_bufq.bq_head);
        BUFQ_INSERT_TAIL(&tu_sc.sc_bufq, bp);
        if (empty)



Home | Main Index | Thread Index | Old Index