summaryrefslogtreecommitdiff
path: root/sys/dev/pci/mpii.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/dev/pci/mpii.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/dev/pci/mpii.c')
-rw-r--r--sys/dev/pci/mpii.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 2f14f6bf7d9..51da9d5748a 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.144 2022/10/18 07:04:20 kn Exp $ */
+/* $OpenBSD: mpii.c,v 1.145 2023/05/25 19:35:58 kurt Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -2857,7 +2857,8 @@ mpii_init_queues(struct mpii_softc *sc)
void
mpii_wait(struct mpii_softc *sc, struct mpii_ccb *ccb)
{
- struct mutex mtx = MUTEX_INITIALIZER(IPL_BIO);
+ struct mutex mtx = MUTEX_INITIALIZER_FLAGS(IPL_BIO,
+ __MTX_NAME, MTX_NOWITNESS);
void (*done)(struct mpii_ccb *);
void *cookie;