summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2014-07-01 02:11:46 +0000
committerdlg <dlg@openbsd.org>2014-07-01 02:11:46 +0000
commit9636030f241628a044678ecfacc9cc5a4b4dafca (patch)
treee7bd3ca45e0ff1cd236239d9f733f7f91fc610fd
parentstart on being able to safely run io through the midlayer without (diff)
downloadwireguard-openbsd-9636030f241628a044678ecfacc9cc5a4b4dafca.tar.xz
wireguard-openbsd-9636030f241628a044678ecfacc9cc5a4b4dafca.zip
take the biglock when calling an adapters scsi_cmd handler.
-rw-r--r--sys/scsi/scsi_base.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 0ff951ae498..9a5b6dce0d2 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.212 2014/07/01 01:56:39 dlg Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.213 2014/07/01 02:11:46 dlg Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -1284,7 +1284,9 @@ scsi_xs_exec(struct scsi_xfer *xs)
#endif
/* The adapter's scsi_cmd() is responsible for calling scsi_done(). */
+ KERNEL_LOCK();
xs->sc_link->adapter->scsi_cmd(xs);
+ KERNEL_UNLOCK();
}
/*