summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-07-31 17:45:50 +0000
committerjhb <jhb@FreeBSD.org>2001-07-31 17:45:50 +0000
commit02db8471a3be2a09b386b379a01f006bded0a929 (patch)
tree17d35f75d4114e2acc7240ff305254742c6a2ddc /sys
parenta0a2e280bd15187238579a3c7f0d0574b83b3984 (diff)
downloadFreeBSD-src-02db8471a3be2a09b386b379a01f006bded0a929.zip
FreeBSD-src-02db8471a3be2a09b386b379a01f006bded0a929.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_mutex.c3
-rw-r--r--sys/kern/subr_turnstile.c3
2 files changed, 6 insertions, 0 deletions
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:
OpenPOWER on IntegriCloud