Introduce priterator(), the `ps_list' iterator. Some of `allprocess'
authormvs <mvs@openbsd.org>
Mon, 15 Jan 2024 15:47:37 +0000 (15:47 +0000)
committermvs <mvs@openbsd.org>
Mon, 15 Jan 2024 15:47:37 +0000 (15:47 +0000)
commitd221342b6cd40a5e60cc3e4b097262466a5d0362
treeb1974f01390bf98c718b325ae5a2ab68b6f9c2ef
parentd8eba67b8af3b0a2bb8f1ac3c95c2a5fb1cb3038
Introduce priterator(), the `ps_list' iterator. Some of `allprocess'
list walkthroughs have context switch within, so make exit1() wait
until the last reference released.

Reported-by: syzbot+0e9dda76c42c82c626d7@syzkaller.appspotmail.com
ok bluhm claudio
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_proc.c
sys/kern/kern_sysctl.c
sys/sys/proc.h