From nobody Sat Jan 04 03:57:49 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YQ69B03jKz5j96C; Sat, 04 Jan 2025 03:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YQ69948W2z4qcC; Sat, 4 Jan 2025 03:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735963069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AfV1AoLlJS4AE+91biEEFgNN5x3uiBXlH5K8s6gimLA=; b=xtbSyIa6tPEcY1QDiwL9mYpALwVtAusm1ht08guNiXJfB0O0JflTz/csmvQvhcbYNP6FLt w0U3Pctvu7qBV/ee6/AGVUYxkc/WuRSvFK1I629pZ/MxDgjoZnS1a/cQp4f5eFqzA4xq+r wOSleuCt6IW1LuAXJse7F7Zb2jqPnA24/0uZE4aOh41R6wgNgQAqk2l1Tg+wlFXKIXQr44 vBu0BfCChTpqbOlT/MmNyZCSvK48t4CkKfO+x21AZq8fqm5TZZPiVcBqW8UJxetwP6iugt JTYUn9hLrIhdwecHHUB5wa5/ZaKsT7uCaW10blwza1fA23JEGuv793hlaqXqfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735963069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AfV1AoLlJS4AE+91biEEFgNN5x3uiBXlH5K8s6gimLA=; b=fFjaO3CScljyBVIHLy+HxSHoG8s+DXFwO0WRvRB0iZqjepFoGk8sHh7mUi1sL/PEtOUnGy WAXy59ElphM829ReVg8Gf+bj9izDcObSM96K+yTu/toe9DlV1viWvD5QKNzawW2dCz2YXW DvFnIOAWHA8dVY8Uq233E4krDWsbOq9XMOUtpaMWZdfEN+7Wecg9Pi93AJvvjQ3Z8hxZpB od8oWQRavSaYAY9bBTPZDwIrOTpB/uBhTjgMnQEOpdOqghVkF1nj3qm2eEX22X3wPBrwWC YV9Gy+02AcBdY6KCvjrgI/ZMklKQzEUDBBuoWAP+NGVbnn36JypXApQu6MqELg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735963069; a=rsa-sha256; cv=none; b=DrKNVfF9JLFx1mBrKgt1N+EEKtGKdqHliveOW8GRv1Pz/AzWknkLVQkWPA7z3tgCcSQBOD UIV5xLut/PYm6XeA78nJAWKFexf3sRfLUes17HS1vW8T4RQtv9quPR9HUq7hNJ4JnOMOKK FkAx9AajH+jNcdGSdJb+i6aUcDxi2hHEO/kHUEYVJKhsRwwXptUq8eRq+htQ4mhJ/CSiKA vYLit6Zw/+RJ3hDx4wTdgfyCuBdenzWxo6WhEvURWn+OFwZwCDrXnojK52ICfRmeW/UlC7 nmAJF6rbtnHksmXRxj5bRIh1QexlxDepBI6DmSqLHsdNzVd/UZu636o3BtBu1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YQ6993SKHzd1m; Sat, 04 Jan 2025 03:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5043vnpO028429; Sat, 4 Jan 2025 03:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5043vnCk028426; Sat, 4 Jan 2025 03:57:49 GMT (envelope-from git) Date: Sat, 4 Jan 2025 03:57:49 GMT Message-Id: <202501040357.5043vnCk028426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 85671cefd93f - stable/14 - check_cancel: when in_sigsuspend, send SIGCANCEL unconditionally List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 85671cefd93fff9baf5245b6aae0b44d30621b94 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=85671cefd93fff9baf5245b6aae0b44d30621b94 commit 85671cefd93fff9baf5245b6aae0b44d30621b94 Author: Konstantin Belousov AuthorDate: 2024-12-24 00:08:17 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-04 03:57:24 +0000 check_cancel: when in_sigsuspend, send SIGCANCEL unconditionally PR: 283101 (cherry picked from commit 9f78c837d94f73f1485e2ce012a8e64197dae9d5) --- lib/libthr/thread/thr_sig.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index a8268f2a770d..1e4a0b9a8f72 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -356,9 +356,11 @@ check_cancel(struct pthread *curthread, ucontext_t *ucp) * on getting a signal before it agrees to return. */ if (curthread->cancel_point) { - if (curthread->in_sigsuspend && ucp != NULL) { - SIGADDSET(ucp->uc_sigmask, SIGCANCEL); - curthread->unblock_sigcancel = 1; + if (curthread->in_sigsuspend) { + if (ucp != NULL) { + SIGADDSET(ucp->uc_sigmask, SIGCANCEL); + curthread->unblock_sigcancel = 1; + } _thr_send_sig(curthread, SIGCANCEL); } else thr_wake(curthread->tid);