Use the process ps_mtx to protect the process sigacts structure.
authorclaudio <claudio@openbsd.org>
Fri, 13 May 2022 15:32:00 +0000 (15:32 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 13 May 2022 15:32:00 +0000 (15:32 +0000)
commit77aba2bee5ee76372cb89b527db49a2cbedea730
treed7e3a549dab914ad78b6cc6298c50e5831a4c4bb
parent2f20f629b160bf72d314c538927edc485e6df416
Use the process ps_mtx to protect the process sigacts structure.
With this cursig(), postsig() and trapsignal() become safe to be called
without KERNEL_LOCK. As a side-effect sleep with PCATCH no longer needs
the KERNEL_LOCK either. Since sending a signal can happen from interrupt
context raise the ps_mtx IPL to high.
Feedback from mpi@ and kettenis@
OK kettenis@
sys/kern/kern_fork.c
sys/kern/kern_sig.c
sys/kern/kern_synch.c
sys/sys/proc.h
sys/sys/signalvar.h
sys/sys/sysctl.h