lkml.org 
[lkml]   [2023]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix data race in mark_rt_mutex_waiters
On Mon, Jan 23, 2023 at 08:40:14AM -0800, Paul E. McKenney wrote:
> In the case, the value read is passed into cmpxchg_relaxed(), which
> checks the value against memory. In this case, as Arjan noted, the only
> compiler-and-silicon difference between data_race() and READ_ONCE()
> is that use of data_race() might allow the compiler to do things like
> tear the load, thus forcing the occasional spurious cmpxchg_relaxed()
> failure.

Is it possible in theory for a torn load to cause a spurious
cmpxchg_relaxed() success? Or would that not matter here?

Alan

\
 
 \ /
  Last update: 2023-03-26 23:52    [W:1.192 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site