On Fri, May 31, 2019 at 08:45:47AM -0700, Eric Dumazet wrote:
> On 5/31/19 7:45 AM, Herbert Xu wrote:
> > 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.
> I have already explained that the READ_ONCE() was a leftover of the first
> version
> of the patch, that I refined later, adding correct (and slightly more
> complex) RCU
> barriers and rules.
AFAICT, neither barrier() nor RCU synchronization can be used as
a replacement for {READ,WRITE}_ONCE() here (and in tons of other
different situations). IOW, you might want to try harder. ;-)
Thanks,
Andrea