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/dev/pci/mpii.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci/mpii.c') 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; -- cgit v1.2.3