git: 71f01edb5459 - stable/14 - EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Tue, 05 Dec 2023 00:43:57 UTC
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=71f01edb545968ae42967fa989cb818a3991f0cb

commit 71f01edb545968ae42967fa989cb818a3991f0cb
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-11-28 15:42:49 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-12-05 00:43:27 +0000

    EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork
    
    (cherry picked from commit 171f0832c5b15f2f66d2fe59967348a42814b0c1)
---
 sys/kern/kern_fork.c | 1 -
 sys/kern/kern_proc.c | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index aaa46a64ef9f..edcd8a1f2139 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -624,7 +624,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread *
 	LIST_INIT(&p2->p_orphans);
 
 	callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0);
-	TAILQ_INIT(&p2->p_kqtim_stop);
 
 	/*
 	 * This begins the section where we must prevent the parent
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index 2daf39b398b5..936d410133eb 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -277,6 +277,7 @@ proc_init(void *mem, int size, int flags)
 	EVENTHANDLER_DIRECT_INVOKE(process_init, p);
 	p->p_stats = pstats_alloc();
 	p->p_pgrp = NULL;
+	TAILQ_INIT(&p->p_kqtim_stop);
 	return (0);
 }