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@
-/* $OpenBSD: mfi.c,v 1.188 2022/04/16 19:19:59 naddy Exp $ */
+/* $OpenBSD: mfi.c,v 1.189 2023/05/25 19:35:58 kurt Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
void
mfi_exec(struct mfi_softc *sc, struct mfi_ccb *ccb)
{
- struct mutex m = MUTEX_INITIALIZER(IPL_BIO);
+ struct mutex m = MUTEX_INITIALIZER_FLAGS(IPL_BIO, __MTX_NAME,
+ MTX_NOWITNESS);
#ifdef DIAGNOSTIC
if (ccb->ccb_cookie != NULL || ccb->ccb_done != NULL)
-/* $OpenBSD: mpi.c,v 1.224 2022/04/16 19:19:59 naddy Exp $ */
+/* $OpenBSD: mpi.c,v 1.225 2023/05/25 19:35:58 kurt Exp $ */
/*
* Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org>
void
mpi_wait(struct mpi_softc *sc, struct mpi_ccb *ccb)
{
- struct mutex cookie = MUTEX_INITIALIZER(IPL_BIO);
+ struct mutex cookie = MUTEX_INITIALIZER_FLAGS(
+ IPL_BIO, __MTX_NAME, MTX_NOWITNESS);
void (*done)(struct mpi_ccb *);
done = ccb->ccb_done;
-/* $OpenBSD: mfii.c,v 1.87 2022/09/25 08:15:43 stsp Exp $ */
+/* $OpenBSD: mfii.c,v 1.88 2023/05/25 19:35:58 kurt Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
int
mfii_exec(struct mfii_softc *sc, struct mfii_ccb *ccb)
{
- struct mutex m = MUTEX_INITIALIZER(IPL_BIO);
+ struct mutex m = MUTEX_INITIALIZER_FLAGS(IPL_BIO, __MTX_NAME,
+ MTX_NOWITNESS);
#ifdef DIAGNOSTIC
if (ccb->ccb_cookie != NULL || ccb->ccb_done != NULL)
-/* $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
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;
-/* $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 $ */
/*
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