HomeFreeBSD

Lock proctree in around fill_kinfo_proc().

Description

Lock proctree in around fill_kinfo_proc().

Proctree lock is needed for correct calculation and collection of the
job-control related data in kinfo_proc. There was even an XXX comment
about it.

Satisfy locking and lock ordering requirements by taking proctree lock
around pass over each bucket in proc_iterate(), and in sysctl_kern_proc()
and note_procstat_proc() for individual process reporting.

Reviewed by: jilles
Tested by: pho
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27871

Details

Provenance
kibAuthored on Dec 31 2020, 10:29 PM
Reviewer
jilles
Differential Revision
D27871: Rework jobc handling.
Parents
R10:a008bdeda3b8: tty_wait_background: improve locking.
Branches
Unknown
Tags
Unknown