From nobody Wed Jan 12 05:41:53 2022 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 AD3E81951993; Wed, 12 Jan 2022 05:41:54 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JYbzP5HQ0z3Kyv; Wed, 12 Jan 2022 05:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 95FB72722E; Wed, 12 Jan 2022 05:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20C5frKr045728; Wed, 12 Jan 2022 05:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20C5frXo045727; Wed, 12 Jan 2022 05:41:53 GMT (envelope-from git) Date: Wed, 12 Jan 2022 05:41:53 GMT Message-Id: <202201120541.20C5frXo045727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a24afbb4e633 - main - Ignore debugger-injected signals left after detaching 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: a24afbb4e633f6725dfe3de099b8e2a4f6b1b631 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641966113; 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=GQuT6pjGc5Q07BPQX6F5jxQ0p/yeBlQR20EScP08oi4=; b=Fc1gEj9F02UM0m8tBA/t+Fi1/CFQyDH8tT9n4jtzdOxPOBVCx5j7ViN5B/9/AILwQY/emN NCdeQ1irkSjGC/3YamTl9MA+IOGOb9DC2eZR04tZ7wrbJSntkS+3Ve0aKtCCiRMcPbUJtl KYn3Gr9mrs/iKmuZeu8NozB6XpjCM/l7kP4co8gDs5kyTMsrDL8MWn7QsuN6kWy01ETcse DsMXSlgGI7QEKCx+BED6r/1zrkWj+CMsE/+0O7DoyWgtRQ/0G9I9gENg46pfkgW8qb9LbE +YMVzKNgYGqTxSn1RvlwmK+ThLePU+TXQq38W6E/7N/Vgf0Q5IvPk05iCv72EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641966113; a=rsa-sha256; cv=none; b=q4pAdubS6eoHoj0phGcQ4O4lVEQZt30Xx0ysaW4OSVHO5DZTSCE/wkzsPvshSJr2MGiB7C Ut4CYZs94bIR+rSb8vwmFGIVQ9Q4MxCZc9BTfMkcqb/WDWYq8+YF3FjW5QbB0vqSLvLWce f5WMpoqFuxgS+ZafUxue7r3l/eJvEMNcs5EezIwn8O/fNCg7NM+AcZdXutpQGYq+ITtJoT 7qXs/yxGw6uaW02iX+qDD4qkmu/Wc9OZMPTF7CCSMypBV2JRIIenPVmni6x3N+jq8jg6Q8 6rit/OQLE8sTPqOlWdB7dUKlP2a4Izh99d4a2f6MQ9rlWbZqvbiVdwd/+38LJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a24afbb4e633f6725dfe3de099b8e2a4f6b1b631 commit a24afbb4e633f6725dfe3de099b8e2a4f6b1b631 Author: Konstantin Belousov AuthorDate: 2022-01-08 09:46:45 +0000 Commit: Konstantin Belousov CommitDate: 2022-01-12 05:33:30 +0000 Ignore debugger-injected signals left after detaching PR: 261010 Reported by: Martin Simmons Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D33787 --- sys/kern/kern_sig.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 0b74ebe80cdd..4a15bd453557 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2992,8 +2992,10 @@ sigprocess(struct thread *td, int sig) * and p_sigact are consistent. */ if ((p->p_flag & P_TRACED) == 0) { - ksi.ksi_flags |= KSI_HEAD; - sigqueue_add(queue, sig, &ksi); + if ((ksi.ksi_flags & KSI_PTRACE) == 0) { + ksi.ksi_flags |= KSI_HEAD; + sigqueue_add(queue, sig, &ksi); + } return (SIGSTATUS_HANDLED); } }