diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2009-12-06 03:35:28 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2009-12-06 03:35:28 +0000 |
commit | ce2a310a47f433c9f9b3c1d0b7b0e24b4bab0e82 (patch) | |
tree | 7a7afd50a185d78e7f573c096fa5dcc4cbefe429 | |
parent | 9de1936628e51ea22f6b2aacd272bb6124042bc5 (diff) |
biodone must be called at splbio.
-rw-r--r-- | sys/scsi/sd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 87a0133f647..5c387e34cf1 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.169 2009/12/03 14:31:03 dlg Exp $ */ +/* $OpenBSD: sd.c,v 1.170 2009/12/06 03:35:27 dlg Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -686,6 +686,7 @@ sdstart(void *v) int nblks; int read; struct partition *p; + int s; if (sc->flags & SDF_DYING) return; @@ -713,7 +714,9 @@ sdstart(void *v) bp->b_error = EIO; bp->b_flags |= B_ERROR; bp->b_resid = bp->b_bcount; + s = splbio(); biodone(bp); + splx(s); continue; } @@ -1531,10 +1534,13 @@ void sd_kill_buffers(struct sd_softc *sd) { struct buf *bp; + int s; while ((bp = sd_buf_dequeue(sd)) != NULL) { bp->b_error = ENXIO; bp->b_flags |= B_ERROR; + s = splbio(); biodone(bp); + splx(s); } } |