diff options
author | trasz <trasz@FreeBSD.org> | 2012-04-17 13:44:40 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2012-04-17 13:44:40 +0000 |
commit | a41bb18a2972ad4367c7880992b63b7e4b3df8ee (patch) | |
tree | a86b1c2c4be3cd0d14a6fe18be69bd7b635f5de1 /sys/kern | |
parent | c37ffba90af74bab6612174c69103ae8a647988a (diff) | |
download | FreeBSD-src-a41bb18a2972ad4367c7880992b63b7e4b3df8ee.zip FreeBSD-src-a41bb18a2972ad4367c7880992b63b7e4b3df8ee.tar.gz |
Fix panic, triggered like this: "int main() { thr_exit(); }"
Submitted by: Mateusz Guzik
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_thr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index f283afb..ee0da02 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -317,13 +317,13 @@ sys_thr_exit(struct thread *td, struct thr_exit_args *uap) rw_wlock(&tidhash_lock); PROC_LOCK(p); - racct_sub(p, RACCT_NTHR, 1); /* * Shutting down last thread in the proc. This will actually * call exit() in the trampoline when it returns. */ if (p->p_numthreads != 1) { + racct_sub(p, RACCT_NTHR, 1); LIST_REMOVE(td, td_hash); rw_wunlock(&tidhash_lock); tdsigcleanup(td); |