Change how ps_threads and p_thr_link are locked away from using SCHED_LOCK.
authorclaudio <claudio@openbsd.org>
Fri, 8 Sep 2023 09:06:31 +0000 (09:06 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 8 Sep 2023 09:06:31 +0000 (09:06 +0000)
commit13095e6dd0735888515c168c112f29db29ff12a2
treee3338262c6370df1f2170fcca775adc03b880504
parentda4edc7f1524374aff90071fe404e820896a601a
Change how ps_threads and p_thr_link are locked away from using SCHED_LOCK.

The per process thread list can be traversed (read) by holding either
the KERNEL_LOCK or the per process ps_mtx (instead of SCHED_LOCK).
Abusing the SCHED_LOCK for this makes it impossible to split up the
scheduler lock into something more fine grained.

Tested by phessler@, ok mpi@
sys/kern/kern_exit.c
sys/kern/kern_fork.c
sys/kern/kern_resource.c
sys/kern/kern_sig.c
sys/kern/kern_synch.c
sys/sys/proc.h