Re: [patch V5 11/26] posix-timers: Add a refcount to struct k_itimer
From: Frederic Weisbecker
Date: Mon Oct 28 2024 - 10:43:08 EST
Le Tue, Oct 01, 2024 at 10:42:14AM +0200, Thomas Gleixner a écrit :
> From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>
> To cure the SIG_IGN handling for posix interval timers, the preallocated
> sigqueue needs to be embedded into struct k_itimer to prevent life time
> races of all sorts.
>
> To make that work correctly it needs reference counting so that timer
> deletion does not free the timer prematuraly when there is a signal queued
> or delivered concurrently.
>
> Add a rcuref to the posix timer part.
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Acked-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>