On Fri, May 31, 2019 at 10:24:08AM +0200, Dmitry Vyukov wrote: > > OK, let's call it barrier. But we need more than a barrier here then.
READ_ONCE/WRITE_ONCE is not some magical dust that you sprinkle around in your code to make it work without locks. You need to understand exactly why you need them and why the code would be buggy if you don't use them. In this case the code doesn't need them because an implicit barrier() (which is *stronger* than READ_ONCE/WRITE_ONCE) already exists in both places. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt