CVSROOT: /cvs Module name: src Changes by: m...@cvs.openbsd.org 2024/03/30 07:33:21
Modified files: sys/kern : kern_sig.c kern_synch.c sched_bsd.c sys_process.c sys/dev/pci/drm: drm_linux.c sys/sys : proc.h Log message: Prevent a recursion inside wakeup(9) when scheduler tracepoints are enabled. Tracepoints like "sched:enqueue" and "sched:unsleep" were called from inside the loop iterating over sleeping threads as part of wakeup_proc(). When such tracepoints were enabled they could result in another wakeup(9) possibly corrupting the sleepqueue. Rewrite wakeup(9) in two stages, first dequeue threads from the sleepqueue then call setrunnable() and possible tracepoints for each of them. This requires moving unsleep() outside of setrunnable() because it messes with the sleepqueue. ok claudio@