CVSROOT: /cvs Module name: src Changes by: v...@cvs.openbsd.org 2019/04/14 02:51:31
Modified files: share/man/man9 : timeout.9 sys/kern : kern_timeout.c sys/sys : timeout.h Log message: Add lock order checking for timeouts The caller of timeout_barrier() must not hold locks that could prevent timeout handlers from making progress. The system could deadlock otherwise. This patch makes witness(4) able to detect barrier locking errors. This is done by introducing a pseudo-lock that couples the lock chains of barrier callers to the lock chains of timeout handlers. In order to find these errors faster, this diff adds a synchronous version of cancelling timeouts, timeout_del_barrier(9). As the synchronous intent is explicit, this interface can check lock order immediately instead of waiting for the potentially rare occurrence of timeout_barrier(9). OK dlg@ mpi@