mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork
Since kqueue timer may exist after the process that created it exited (same scenario with rfork(2) as in PR 275286), make the tailq p_kqtim_stop accessed by filt_timerdetach() type-stable. Noted and reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42777
This commit is contained in:
parent
ed410b78ed
commit
171f0832c5
@ -622,7 +622,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
|
||||
|
@ -275,6 +275,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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user