From nobody Sun Jan 16 02:54:09 2022 X-Original-To: dev-commits-src-branches@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 1EF2B19583FC; Sun, 16 Jan 2022 02:54:10 +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 4Jc0414GT9z4fnj; Sun, 16 Jan 2022 02:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642301649; 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=tFFjsVrAlmcwv0h08fPOagu4j7qMAHhHh/49KRsb5Lc=; b=aL9UighEdq9QtLarg/KCMOKfyRcFvus7/huxArqfYBDmIaw1+SpxDjjCh5zZq4FwzAIo+x KHatr3H18lBpPeMiSK7nN+Pffxiyzn+6r0c8ZrDDGFWlPyAKyBesPqZVcSUneJoyfuUtFS jP2eRyup8EvexLKsejeUPLbJ4PSC51t1uL6ArYNbxhTl4dm7YX70egTrchV3gZTBZ4WmIR D8JAEaeJqxZLBtOQK2My2nKno/mMuAKmq5Yh6jtLgEuXIHVCMVyE6+2gbRFX6Oa4UokShB L4C6fjx4mwjPhkJ8/K08QtDRS43z+NLMKH7dvo0poTO1nbW+Ul2ChcebQLV8LQ== 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 62D9112C59; Sun, 16 Jan 2022 02:54:09 +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 20G2s9Zv014224; Sun, 16 Jan 2022 02:54:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20G2s9vV014223; Sun, 16 Jan 2022 02:54:09 GMT (envelope-from git) Date: Sun, 16 Jan 2022 02:54:09 GMT Message-Id: <202201160254.20G2s9vV014223@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: a5f698599560 - stable/13 - Ignore debugger-injected signals left after detaching List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: a5f69859956049b5153b0e1b67f8f4a99622dc6f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642301649; 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=tFFjsVrAlmcwv0h08fPOagu4j7qMAHhHh/49KRsb5Lc=; b=DAlfgR426oQaYAaJ3+V463xpZ1DvgKr0dbxt6DUcLTbeRg25nyYnBmhudM4CynxYwWVUQ8 fVnZ8BLlILVuJoiNq2uU6g3jdy8XdhfySnhFz8kGkth+yZ2S9xuUo4sPOggRYUYvENbKDd bMQr2k7+rHgjx2Hp1QUM1rM/NjooYkk2xN/wOUiTk1cVf2ahW/A6Ef/OCrZex49yD7x18V wpzDhnvF6VId9Rv1mGzbq4uG4x4B/XA6uUBAaPV0sSWzNcLVy+kdLH4tXZ8CZamIER3a+F bv/8qkjGqj1wKVkH+FeCYU4LGEwMcKQ5U7hSiT0k45WnwmYHcVBG7Q3DroPzFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642301649; a=rsa-sha256; cv=none; b=knVTQl7zGZKRLkmDq9/C5BaAdElukElIhL7dDFz2t5ftJ/7CZ3uZkcEhnj8t0gMHDlH0+w 8HEDZIcqS6XV5k3RFmoo114sOWOpXbZj0/rjy83FW9CiLSQeIA/ufJlSNHaRVNlCtn73S8 tOVmANCkDKs+01+C3WDM1TVINw0zAzJtx6ByuH4mBaxbIIyoUYpqFOxC1VIF0SzhUc096f eDXko2R2eMNuo0e+hintppVifO9xUvEviZndH3bun9/+UwQ0AzNz9l5bDAMSgdWyrchxuy zWwHjVnrhSkGyPMfVsNSnIJExachkymB90RsJ487YDzQmp+TcKEcTk3AlgNhMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f69859956049b5153b0e1b67f8f4a99622dc6f commit a5f69859956049b5153b0e1b67f8f4a99622dc6f Author: Konstantin Belousov AuthorDate: 2022-01-08 09:46:45 +0000 Commit: Konstantin Belousov CommitDate: 2022-01-15 12:55:32 +0000 Ignore debugger-injected signals left after detaching PR: 261010 (cherry picked from commit a24afbb4e633f6725dfe3de099b8e2a4f6b1b631) --- 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 6f656ba92107..8680b30aa651 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -3009,8 +3009,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); } }