]> git.ipfire.org Git - thirdparty/glibc.git/commit
hurd: calling alarm() whilst handling SIGALRM can deadlock. master
authorMike Kelly <mike@weatherwax.co.uk>
Sat, 14 Feb 2026 09:17:11 +0000 (09:17 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 14 Feb 2026 13:39:38 +0000 (14:39 +0100)
commit288b55f4636f336cc336344e4215ead9c4d592fc
treec7bc0853f8264bc788e5968713ada146a6bb2f37
parent5b713b49443eb6a4e54e50e2f0147105f86dab02
hurd: calling alarm() whilst handling SIGALRM can deadlock.

alarm() and restart_itimer() can attempt to acquire _hurd_siglock and
_hurd_itimer_lock in opposite sequence resulting in occasional
deadlock. Rearranged to always acquire the locks in the same sequence
with a new pre-condition that setitimer_locked() must be called with
both locks already acquired.
Message-ID: <20260214091715.157471-2-mike@weatherwax.co.uk>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
sysdeps/mach/hurd/setitimer.c