From 782ac25a492c27c4e58d297c9151515fde960e35 Mon Sep 17 00:00:00 2001 From: Kurt Miller Date: Thu, 25 May 2023 19:35:59 +0000 Subject: 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@ --- sys/scsi/scsi_base.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/scsi') 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 -- cgit v1.2.3