Fix SCHED_LOCK() leak in single_thread_set()
authorclaudio <claudio@openbsd.org>
Sat, 9 Sep 2023 14:50:09 +0000 (14:50 +0000)
committerclaudio <claudio@openbsd.org>
Sat, 9 Sep 2023 14:50:09 +0000 (14:50 +0000)
commit4ab8b759f72eb3ad9844a8a2e6e63d176484b08e
treebb0688192494dc42d37f476b3ff9b8137145a718
parent027215cf0916a4a23f00c35286ea0487e53a5981
Fix SCHED_LOCK() leak in single_thread_set()

In the (q->p_flag & P_WEXIT) branch is a continue that did not release
the SCHED_LOCK. Refactor the code a bit to simplify the places SCHED_LOCK
is grabbed and released.

Reported-by: syzbot+ea26d351acfad3bb3f15@syzkaller.appspotmail.com
OK kettenis@
sys/kern/kern_sig.c