Date: Thu, 25 May 2017 01:09:45 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r318845 - stable/11/sys/kern Message-ID: <201705250109.v4P19j2r020394@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu May 25 01:09:45 2017 New Revision: 318845 URL: https://svnweb.freebsd.org/changeset/base/318845 Log: MFC r318191: Let ptracestop() suspend threads sleeping in an SBDRY section. Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Thu May 25 01:01:35 2017 (r318844) +++ stable/11/sys/kern/kern_sig.c Thu May 25 01:09:45 2017 (r318845) @@ -2495,6 +2495,7 @@ sig_suspend_threads(struct thread *td, s PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); + MPASS(sending || td == curthread); wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { @@ -2511,10 +2512,9 @@ sig_suspend_threads(struct thread *td, s */ KASSERT(!TD_IS_SUSPENDED(td2), ("thread with deferred stops suspended")); - if (TD_SBDRY_INTR(td2) && sending) { + if (TD_SBDRY_INTR(td2)) wakeup_swapper |= sleepq_abort(td2, TD_SBDRY_ERRNO(td2)); - } } else if (!TD_IS_SUSPENDED(td2)) { thread_suspend_one(td2); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705250109.v4P19j2r020394>