Re: [patch V3 7/8] posix-cpu-timers: Prevent enqueueing when PF_EXITING is set

From: Frederic Weisbecker

Date: Sat Sep 12 2026 - 17:09:24 EST


Le Fri, Sep 11, 2026 at 11:09:40AM +0200, Thomas Gleixner a écrit :
> From: Thomas Gleixner <tglx@xxxxxxxxxx>
>
> To prepare for cleaning up POSIX CPU timers in do_exit(), prevent
> enqueueing POSIX CPU timers on a task which has PF_EXITING set. Queueing a
> timer on such a task is pointless because the task won't expire the timer
> anymore.
>
> The same applies to process wide timers when tsk::signal::flags has
> SIGNAL_GROUP_EXIT set.
>
> Pretending that the timer is armed allows to keep the POSIX timer mechanism
> "working" so that the timer stays accessible up to the point where a task
> is unhashed.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
> Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>

Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

--
Frederic Weisbecker
SUSE Labs