On Wed, May 21, 2014 at 12:39:11PM -0700, Jarno Rajahalme wrote:
> Acked-by: Jarno Rajahalme
Thanks. Applied to master.
> I still worry about reordering of the non-atomic reads in between
> the read_counter() calls, as in principle the acquire barrier does
> not prevent loads before such a barr
Acked-by: Jarno Rajahalme
I still worry about reordering of the non-atomic reads in between the
read_counter() calls, as in principle the acquire barrier does not prevent
loads before such a barrier to be moved after it. Thus, this could happen:
for (;;) {
c = read_even_counter()
check
Release memory ordering only affects visibility of stores, and is not
allowed on a memory read. Some compilers enforce this, making this code
fail to compile.
Reported-by: Alex Wang
Reported-by: Kmindg G
CC: Jarno Rajahalme
Signed-off-by: Ben Pfaff
---
lib/cmap.c | 8
1 file changed