Date: Sat, 17 Feb 2018 13:27:38 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Mateusz Guzik <mjg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329448 - head/sys/kern Message-ID: <20180217112738.GO94212@kib.kiev.ua> In-Reply-To: <201802170848.w1H8mkfb081764@repo.freebsd.org> References: <201802170848.w1H8mkfb081764@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 17, 2018 at 08:48:46AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Sat Feb 17 08:48:45 2018 > New Revision: 329448 > URL: https://svnweb.freebsd.org/changeset/base/329448 > > Log: > exit: get rid of PROC_SLOCK when checking a process to report Was this tested ? In particular, are you aware of r309539 ? > > All accessed fields are protected with already held process lock. > > Modified: > head/sys/kern/kern_exit.c > > Modified: head/sys/kern/kern_exit.c > ============================================================================== > --- head/sys/kern/kern_exit.c Sat Feb 17 08:12:35 2018 (r329447) > +++ head/sys/kern/kern_exit.c Sat Feb 17 08:48:45 2018 (r329448) > @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180217112738.GO94212>