aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2020-04-09 23:42:13 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2020-04-09 23:42:13 +0000
commit9a79b9900346a405780f02f757396070de5e9a51 (patch)
tree50a7adea1884b1bcecca964460f88c06debdb5d8 /sys/kern/kern_lock.c
parent09bae0a02343d49e7ee97b78a13a36d84880d250 (diff)
downloadsrc-9a79b9900346a405780f02f757396070de5e9a51.tar.gz
src-9a79b9900346a405780f02f757396070de5e9a51.zip
When running with a kernel compiled with DEBUG_LOCKS, before
panic'ing for recusing on a non-recursive lock, print out the kernel stack where the lock was originally acquired.
Notes
Notes: svn path=/head/; revision=359759
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 09e56cc08005..d5cf65c27de6 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -732,6 +732,7 @@ lockmgr_xlock_hard(struct lock *lk, u_int flags, struct lock_object *ilk,
class = LOCK_CLASS(ilk);
class->lc_unlock(ilk);
}
+ STACK_PRINT(lk);
panic("%s: recursing on non recursive lockmgr %p "
"@ %s:%d\n", __func__, lk, file, line);
}