aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2018-02-17 08:48:45 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2018-02-17 08:48:45 +0000
commit9c0e785c58ad6f15a6f2f042b20fa2735785c0d9 (patch)
tree835ebe34767b622d0c001f122153ff69bdf54911 /sys
parentaf4010be77c58641b2fe31cdfcad220db2924418 (diff)
downloadsrc-9c0e785c58ad6f15a6f2f042b20fa2735785c0d9.tar.gz
src-9c0e785c58ad6f15a6f2f042b20fa2735785c0d9.zip
exit: get rid of PROC_SLOCK when checking a process to report
All accessed fields are protected with already held process lock.
Notes
Notes: svn path=/head/; revision=329448
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_exit.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 91375e435700..05d05c6932c1 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1228,15 +1228,11 @@ loop_locked:
nfound++;
PROC_LOCK_ASSERT(p, MA_OWNED);
- if ((options & (WTRAPPED | WUNTRACED)) != 0)
- PROC_SLOCK(p);
-
if ((options & WTRAPPED) != 0 &&
(p->p_flag & P_TRACED) != 0 &&
(p->p_flag & (P_STOPPED_TRACE | P_STOPPED_SIG)) != 0 &&
p->p_suspcount == p->p_numthreads &&
(p->p_flag & P_WAITED) == 0) {
- PROC_SUNLOCK(p);
CTR4(KTR_PTRACE,
"wait: returning trapped pid %d status %#x "
"(xstat %d) xthread %d",
@@ -1251,13 +1247,10 @@ loop_locked:
(p->p_flag & P_STOPPED_SIG) != 0 &&
p->p_suspcount == p->p_numthreads &&
(p->p_flag & P_WAITED) == 0) {
- PROC_SUNLOCK(p);
report_alive_proc(td, p, siginfo, status, options,
CLD_STOPPED);
return (0);
}
- if ((options & (WTRAPPED | WUNTRACED)) != 0)
- PROC_SUNLOCK(p);
if ((options & WCONTINUED) != 0 &&
(p->p_flag & P_CONTINUED) != 0) {
report_alive_proc(td, p, siginfo, status, options,