Re: [PATCH RFC 8/9] rtmutex: Use accessor for hrtimer_sleeper ->task field

"Paul E. McKenney" <[email protected]>
Newsgroups org.kernel.vger.linux-kernel
Message-ID <e21519d5-4f36-41dd-84eb-c0e939e814c9@paulmck-laptop>
On Tue, Aug 04, 2026 at 05:32:31PM +0000, Dmitry Ilvokhin wrote:
> On Thu, Jul 30, 2026 at 05:40:18PM -0700, Paul E. McKenney wrote:
> > The hrtimer_sleeper structure's ->task field is used as a flag to indicate
> > that the associated hrtimer has expired.  This means that the hrtimer
> > handler can be storing to this field while other code is loading from it
> > to check for expiry.  Note that additional races appear for hrtimers that
> > can be restarted, which could be argued to be a user error.  However, that
> > is no reason to let the compiler introduce additional confusion, and to
> > this end, the hrtimer_sleeper_task_get() was introduced, use of which also
> > has the benefit of avoiding open-code access to hrtimer_sleeper innards.
> > 
> > Therefore, apply this accessor to rt_mutex_slowlock_block().
> > 
> > KCSAN located this issue.
> > 
> > Signed-off-by: Paul E. McKenney <[email protected]>
> 
> Reviewed-by: Dmitry Ilvokhin <[email protected]>

I will apply these on my next rebase, thank you!

							Thanx, Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.