diff options
author | 2020-08-09 19:15:47 +0000 | |
---|---|---|
committer | 2020-08-09 19:15:47 +0000 | |
commit | 3c86a58ec71566e00b1985a59e38d0e8890ad3b4 (patch) | |
tree | 67abc7483e75b30c22fb0b3a770c962375a20fd9 /gnu/llvm/compiler-rt/lib/sanitizer_common/scripts/cpplint.py | |
parent | Fix some wrapping/indent. (diff) | |
download | wireguard-openbsd-3c86a58ec71566e00b1985a59e38d0e8890ad3b4.tar.xz wireguard-openbsd-3c86a58ec71566e00b1985a59e38d0e8890ad3b4.zip |
hardclock(9): fix race with setitimer(2) for ITIMER_VIRTUAL, ITIMER_PROF
The ITIMER_VIRTUAL and ITIMER_PROF per-process interval timers are
updated from hardclock(9). If a timer for the parent process is
enabled the hardclock(9) thread calls itimerdecr() to update and
reload it as needed.
However, in itimerdecr(), after entering itimer_mtx, the thread needs
to double-check that the timer in question is still enabled. While
the hardclock(9) thread is entering itimer_mtx a thread in
setitimer(2) can take the mutex and disable the timer.
If the timer is disabled, itimerdecr() should return 1 to indicate
that the timer has not expired and that no action needs to be taken.
ok kettenis@
Diffstat (limited to 'gnu/llvm/compiler-rt/lib/sanitizer_common/scripts/cpplint.py')
0 files changed, 0 insertions, 0 deletions