summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_base.c
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2023-05-25 19:35:59 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2023-05-25 19:35:59 +0000
commit782ac25a492c27c4e58d297c9151515fde960e35 (patch)
treea52fb8854943db9522b2f9647cb33d6d20dcd8c5 /sys/scsi/scsi_base.c
parent387a52cad3078ab991ff6b21c12cb842a92e2f2b (diff)
Disable witness for mutexes created on the stack which allows
the ddb command 'show witness' to succeed without panicking. Leaving witness enabled on these mutexes saves a pointer to struct lock_type on the stack which gets clobbered resulting in a panic in witness_ddb_display_descendants(). okay miod@
Diffstat (limited to 'sys/scsi/scsi_base.c')
-rw-r--r--sys/scsi/scsi_base.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 299509c7bc7..50aa10fd6cd 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.280 2022/02/28 14:48:11 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.281 2023/05/25 19:35:58 kurt Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -1497,7 +1497,8 @@ scsi_done(struct scsi_xfer *xs)
int
scsi_xs_sync(struct scsi_xfer *xs)
{
- struct mutex cookie = MUTEX_INITIALIZER(IPL_BIO);
+ struct mutex cookie = MUTEX_INITIALIZER_FLAGS(IPL_BIO, __MTX_NAME,
+ MTX_NOWITNESS);
int error;
#ifdef DIAGNOSTIC