]> www.infradead.org Git - users/jedix/linux-maple.git/commit
posix-timers: Drop signal if timer has been deleted or reprogrammed
authorThomas Gleixner <tglx@linutronix.de>
Tue, 1 Oct 2024 08:42:06 +0000 (10:42 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 29 Oct 2024 10:43:19 +0000 (11:43 +0100)
commit2860d4d315dc01f001dfd328adaf2ab440c47dd3
treead181993fc4f2838bd73b92b6b0c262bde49c7f0
parentc775ea28d4e23f5e58b6953645ef90c1b27a8e83
posix-timers: Drop signal if timer has been deleted or reprogrammed

No point in delivering a signal from the past. POSIX does not specify the
behaviour here:

 - "The effect of disarming or resetting a timer with pending expiration
    notifications is unspecified."

 - "The disposition of pending signals for the deleted timer is unspecified."

In both cases it is reasonable to expect that pending signals are
discarded. Especially in the reprogramming case it does not make sense to
account for previous overruns or to deliver a signal for a timer which has
been disarmed.

Drop the signal as that is conistent and understandable behaviour.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20241001083835.553646280@linutronix.de
kernel/time/posix-timers.c