From 02db8471a3be2a09b386b379a01f006bded0a929 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 31 Jul 2001 17:45:50 +0000 Subject: If we have already panic'd then don't bother enforcing mutex asserts as things are pretty much shot already and all panic'ing does is hurt our chances of getting a dump. Inspired by: sheldonh --- sys/kern/kern_mutex.c | 3 +++ sys/kern/subr_turnstile.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index f2740f6..6baf62a 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -562,6 +562,9 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line) void _mtx_assert(struct mtx *m, int what, const char *file, int line) { + + if (panicstr != NULL) + return; switch (what) { case MA_OWNED: case MA_OWNED | MA_RECURSED: diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index f2740f6..6baf62a 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -562,6 +562,9 @@ _mtx_unlock_sleep(struct mtx *m, int opts, const char *file, int line) void _mtx_assert(struct mtx *m, int what, const char *file, int line) { + + if (panicstr != NULL) + return; switch (what) { case MA_OWNED: case MA_OWNED | MA_RECURSED: -- cgit v1.1