linux-IllusionX/kernel/time
Frederic Weisbecker 8cd9da85d2 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: 406dd42bd1 ("posix-cpu-timers: Force next expiration recalc after itimer reset")
Reported-by: Victor Stinner <vstinner@redhat.com>
Reported-by: Chris Hixon <linux-kernel-bugs@hixontech.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210913145332.232023-1-frederic@kernel.org
2021-09-23 11:53:51 +02:00
..
alarmtimer.c
clockevents.c
clocksource-wdtest.c
clocksource.c
hrtimer.c
itimer.c
jiffies.c
Kconfig
Makefile
namespace.c
ntp.c
ntp_internal.h
posix-clock.c
posix-cpu-timers.c
posix-stubs.c
posix-timers.c
posix-timers.h
sched_clock.c
test_udelay.c
tick-broadcast-hrtimer.c
tick-broadcast.c
tick-common.c
tick-internal.h
tick-legacy.c
tick-oneshot.c
tick-sched.c
tick-sched.h
time.c
time_test.c
timeconst.bc
timeconv.c
timecounter.c
timekeeping.c
timekeeping.h
timekeeping_debug.c
timekeeping_internal.h
timer.c
timer_list.c
vsyscall.c