Re: [PATCH RFC tip/core/rcu 12/15] lib/assoc_array: Remove smp_read_barrier_depends()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> > Now that smp_read_barrier_depends() is implied by READ_ONCE(), adding
> > READ_ONCE() to assoc_array_ptr_to_leaf() and __assoc_array_ptr_to_meta()
> > allows the several smp_read_barrier_depends() calls to be removed from
> > lib/assoc_array.c.  This commit makes this change.
> 
> So arguably this code was broken for not already having READ_ONCE().

No, the code is right; this is the wrong place to use READ_ONCE().  The
callers already call READ_ONCE() or ACCESS_ONCE().

David



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux