Re: [PATCH] posix-cpu-timers: Implement the missing timer_wait_running callback

From: Thomas Gleixner
Date: Wed Apr 19 2023 - 03:33:34 EST


On Tue, Apr 18 2023 at 18:44, Frederic Weisbecker wrote:
> Le Mon, Apr 17, 2023 at 03:37:55PM +0200, Thomas Gleixner a écrit :
>> struct cpu_timer {
>> struct timerqueue_node node;
>> @@ -72,6 +74,7 @@ struct cpu_timer {
>> struct pid *pid;
>> struct list_head elist;
>> int firing;
>> + struct task_struct *handling;
>
> I guess it can be made __rcu

Indeed.
>> if (likely(cpu_firing >= 0))
>> cpu_timer_fire(timer);
>> + /* See posix_cpu_timer_wait_running() */
>> + WRITE_ONCE(timer->it.cpu.handling, NULL);
>
> And rcu_assign_pointer()

I fix that up on the fly.

> Aside the boring details:
>
> Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

Thanks for going through this!