diff options
author | jhb <jhb@FreeBSD.org> | 2005-09-02 20:20:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-09-02 20:20:01 +0000 |
commit | 736b03e795aff3a9f15489ccdd58838cbe100297 (patch) | |
tree | e81303e28cab215aeaa8162f972349ebaa169e1c /sys/kern/kern_exit.c | |
parent | c1ec27bc37e0386725c80cce04835273f27f1675 (diff) | |
download | FreeBSD-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.c | 3 |
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); |