Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jan 2022 02:54:09 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: a5f698599560 - stable/13 - Ignore debugger-injected signals left after detaching
Message-ID:  <202201160254.20G2s9vV014223@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=a5f69859956049b5153b0e1b67f8f4a99622dc6f

commit a5f69859956049b5153b0e1b67f8f4a99622dc6f
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-08 09:46:45 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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);
 		}
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201160254.20G2s9vV014223>