diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-11-05 03:01:23 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-11-05 03:01:23 +0000 |
commit | 1ebf3ee9a3db9492efa600f6c7614a1851e8c357 (patch) | |
tree | 50003b0f3882d55b6d31a3135664f3a2abd73c56 /sys/kern/kern_thr.c | |
parent | e07ee09f61c3fc9b2a221bb67f0bb35f0da0ce63 (diff) | |
download | FreeBSD-src-1ebf3ee9a3db9492efa600f6c7614a1851e8c357.zip FreeBSD-src-1ebf3ee9a3db9492efa600f6c7614a1851e8c357.tar.gz |
Revert rev 184216 and 184199, due to the way the thread_lock works,
it may cause a lockup.
Noticed by: peter, jhb
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r-- | sys/kern/kern_thr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 75d6d01..dade1c2 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -286,6 +286,7 @@ thr_exit(struct thread *td, struct thr_exit_args *uap) PROC_LOCK(p); sigqueue_flush(&td->td_sigqueue); + PROC_SLOCK(p); /* * Shutting down last thread in the proc. This will actually @@ -293,10 +294,10 @@ thr_exit(struct thread *td, struct thr_exit_args *uap) */ if (p->p_numthreads != 1) { thread_stopped(p); - PROC_SLOCK(p); thread_exit(); /* NOTREACHED */ } + PROC_SUNLOCK(p); PROC_UNLOCK(p); return (0); } |