diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-13 03:09:06 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-01-13 03:09:06 +0000 |
commit | 6907faaae7983ae04e5ff7b8565a828fc9ff4fe4 (patch) | |
tree | db7d0b641a6db5481b05ba235b89a5f3333d8fc0 /sys | |
parent | 9bc2a099b31d8d8f64270c5dabdb303072fcea79 (diff) |
scsi_xs_sync uses the xs cookie and done pointers, so users of scsi_xs_sync
cannot. panic if theyre set before scsi_xs_sync is called.
question raised by and ok krw@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/scsi_base.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 6514b4c27a9..3714db90057 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.158 2010/01/13 02:46:19 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.159 2010/01/13 03:09:05 dlg Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -784,6 +784,9 @@ scsi_xs_sync(struct scsi_xfer *xs) struct mutex cookie = MUTEX_INITIALIZER(IPL_BIO); int error; + if (xs->done != NULL || xs->cookie != NULL) + panic("scsi_xs_sync: xs done or cookie is set!"); + /* * If we cant sleep while waiting for completion, get the adapter to * complete it for us. |