On Tue, 11 Oct 2022 02:02:08 -0700, Paul E. McKenney wrote: > On Tue, Oct 11, 2022 at 11:20:49AM +0800, Patrick Yingxi Pan wrote: >> Hello! >> >> I have added the missing READ_ONCE(). Please take a look. Thanks. >> >> Signed-off-by: Patrick Pan <pyxchina92929@xxxxxxxxx> > > Queued and pushed, thank you! Paul, somehow Patrick's S-o-b tag is lost in the amended changelog of commit 520ad603b0f3 ("memorder: Correct the transformed Listing 15.30 code"). I don't think it is mandatory in perfbook, but if you can, please fix up. Thanks, Akira > > Thanx, Paul > >> --- >> memorder/memorder.tex | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/memorder/memorder.tex b/memorder/memorder.tex >> index a0a87d0a..50ff2882 100644 >> --- a/memorder/memorder.tex >> +++ b/memorder/memorder.tex >> @@ -2869,7 +2869,7 @@ An equals comparison on \clnref{equ} might lead >> the compiler to (incorrectly) >> conclude that both pointers are equivalent, when in fact they carry >> different dependencies. >> This means that the compiler might well transform \clnref{pc} to instead >> -be \co{r2 = q->c}, which might well cause the value 44 to be loaded >> +be \co{r2 = READ_ONCE(q->c)}, which might well cause the value 44 to be loaded >> instead of the expected value 144. >> \end{fcvref} >> >> >> base-commit: 7f12a9358e220f3d0c3a0880d01bc283113d7a5b >> --