A single fix for the recently introduced regression in posix CPU timers
which failed to stop the timer when requested. That caused unexpected
signals to be sent to the process/thread causing malfunction.
posix-cpu-timers: Prevent spuriously armed 0-value itimer
Resetting/stopping an itimer eventually leads to it being reprogrammed
with an actual "0" value. As a result the itimer expires on the next
tick, triggering an unexpected signal.
To fix this, make sure that
struct signal_struct::it[CPUCLOCK_PROF/VIRT]::expires is set to 0 when
setitimer() passes a 0 it_value, indicating that the timer must stop.
Fixes: 406dd42bd1ba ("posix-cpu-timers: Force next expiration recalc after itimer reset")
Reported-by: Victor Stinner <firstname.lastname@example.org>
Reported-by: Chris Hixon <email@example.com>
Signed-off-by: Frederic Weisbecker <firstname.lastname@example.org>
Signed-off-by: Thomas Gleixner <email@example.com>
1 file changed