Use READ_ONCE() for seq counters (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 5 Apr 2018 17:37:14 +0000 (13:37 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 30 Apr 2018 18:36:28 +0000 (14:36 -0400)
commit2ab1355ca1003d3c1e3bff8b696ce3e412334a66
tree2f9097b8efbe3959bf5b06f97c57e9b11d30874f
parent2ca03965c7a332ab681ca0543f607ed8fa470a0b
Use READ_ONCE() for seq counters (XCC)

READ_ONCE() is like ACCESS_ONCE(), just clearly a read.

There are concurrent writes to the field, ordering matters, etc.  In
seqctr_retry, it was possible for the compiler to generate two reads from
the data structure for the "is locked" and "!=" tests.  We might have had
strange results there.

The seq stuff might need a closer look.

Reinstall your kernel headers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/ros/atomic.h