diff options
author | 2009-12-06 03:35:27 +0000 | |
---|---|---|
committer | 2009-12-06 03:35:27 +0000 | |
commit | e3ae0a12ee0cee029ae0a20a33d15937ccda68a1 (patch) | |
tree | a6aebe79ea8b7cc3caafc97e112b7b058aad23a6 | |
parent | nitems(array) is prettier than sizeof(array)/sizeof(array[0]) (diff) | |
download | wireguard-openbsd-e3ae0a12ee0cee029ae0a20a33d15937ccda68a1.tar.xz wireguard-openbsd-e3ae0a12ee0cee029ae0a20a33d15937ccda68a1.zip |
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); } } |