[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyTJBkZG-XT1crWi@localhost.localdomain>
Date: Fri, 1 Nov 2024 13:26:46 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
John Stultz <jstultz@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Stephen Boyd <sboyd@...nel.org>,
Eric Biederman <ebiederm@...ssion.com>,
Oleg Nesterov <oleg@...hat.com>
Subject: Re: [patch v6 01/20] posix-timers: Make signal delivery consistent
Le Thu, Oct 31, 2024 at 04:46:24PM +0100, Thomas Gleixner a écrit :
> From: Thomas Gleixner <tglx@...utronix.de>
>
> Signals of timers which are reprogammed, disarmed or deleted can deliver
> signals related to the past. The POSIX spec is blury about this:
>
> - "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. This makes the behaviour consistent and understandable.
>
> Remove the si_sys_private check from the signal delivery code and invoke
> posix_timer_deliver_signal() unconditionally for posix timer related
> signals.
>
> Change posix_timer_deliver_signal() so it controls the actual signal
> delivery via the return value. It now instructs the signal code to drop the
> signal when:
>
> 1) The timer does not longer exist in the hash table
>
> 2) The timer signal_seq value is not the same as the si_sys_private value
> which was set when the signal was queued.
>
> This is also a preparatory change to embed the sigqueue into the k_itimer
> structure, which in turn allows to remove the si_sys_private magic.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Frederic Weisbecker <frederic@...nel.org>
Powered by blists - more mailing lists