Re: [PATCH RFC 1/9] hrtimer: Mark data-racy accesses to hrtimer_sleeper ->task field
From: Thomas Gleixner
Date: Tue Aug 11 2026 - 09:37:36 EST
On Thu, Jul 30 2026 at 17:40, Paul E. McKenney wrote:
> static enum hrtimer_restart hrtimer_wakeup(struct hrtimer *timer)
> {
> struct hrtimer_sleeper *t = container_of(timer, struct hrtimer_sleeper, timer);
> - struct task_struct *task = t->task;
> + struct task_struct *task = hrtimer_sleeper_task_get(t);
>
> - t->task = NULL;
> + hrtimer_sleeper_task_set(t, NULL);
To be honest, I find these helper functions more confusing that
useful unless you make the task member private at the very end of the
series once everything is converted over.
If not, then what's wrong with a plain READ/WRITE_ONCE()?
Thanks,
tglx