summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-09-02 20:20:01 +0000
committerjhb <jhb@FreeBSD.org>2005-09-02 20:20:01 +0000
commit736b03e795aff3a9f15489ccdd58838cbe100297 (patch)
treee81303e28cab215aeaa8162f972349ebaa169e1c /sys/kern/kern_exit.c
parentc1ec27bc37e0386725c80cce04835273f27f1675 (diff)
downloadFreeBSD-src-736b03e795aff3a9f15489ccdd58838cbe100297.zip
FreeBSD-src-736b03e795aff3a9f15489ccdd58838cbe100297.tar.gz
Add witness warnings to panic if a thread tries to exit while holding any
locks. Requested by: jeff MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index b2c4a33..9878546 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -487,6 +487,9 @@ retry:
*/
cpu_exit(td);
+ WITNESS_WARN(WARN_PANIC, &proctree_lock.sx_object,
+ "process (pid %d) exiting", p->p_pid);
+
PROC_LOCK(p);
PROC_LOCK(p->p_pptr);
sx_xunlock(&proctree_lock);
OpenPOWER on IntegriCloud