Date: Fri, 24 Jun 2022 19:36:58 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 209131e656bc - stable/13 - weed_inhib(): do not double-suspend already suspended thread if the loop reiterates Message-ID: <202206241936.25OJawEG084236@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=209131e656bc2b0f22f309a73b168ff5d7c52ec9 commit 209131e656bc2b0f22f309a73b168ff5d7c52ec9 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-04-30 23:30:13 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-06-24 14:45:45 +0000 weed_inhib(): do not double-suspend already suspended thread if the loop reiterates (cherry picked from commit b9893b353312cc3c75a0ab2ff7ca69dc55864bea) --- sys/kern/kern_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 5e32a8be8f4e..10b3f1a27876 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1144,7 +1144,8 @@ restart: } if (TD_CAN_ABORT(td2)) { if ((td2->td_flags & TDF_SBDRY) == 0) { - thread_suspend_one(td2); + if (!TD_IS_SUSPENDED(td2)) + thread_suspend_one(td2); td2->td_flags |= TDF_ALLPROCSUSP; } else { wakeup_swapper |= sleepq_abort(td2, ERESTART);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206241936.25OJawEG084236>