git: 565a343ae3a3 - main - sigqueue_delete_set_proc(): initialize sq_proc for worklist

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 11 Jul 2023 00:52:22 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=565a343ae3a30bc2973182ff8dfd2fa37d7f615f

commit 565a343ae3a30bc2973182ff8dfd2fa37d7f615f
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-07-10 00:29:43 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-07-11 00:52:16 +0000

    sigqueue_delete_set_proc(): initialize sq_proc for worklist
    
    This should fix leaks for the p_killpg_cnt counter, because
    sigqueue_flush() drops ksi's.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/kern_sig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 18756d53e98c..ecfde7a549fc 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -683,7 +683,7 @@ sigqueue_delete_set_proc(struct proc *p, const sigset_t *set)
 
 	PROC_LOCK_ASSERT(p, MA_OWNED);
 
-	sigqueue_init(&worklist, NULL);
+	sigqueue_init(&worklist, p);
 	sigqueue_move_set(&p->p_sigqueue, &worklist, set);
 
 	FOREACH_THREAD_IN_PROC(p, td0)