From fbb88a519c0b8192cb5e12a3ea9b26281d9f6ce8 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sat, 11 Aug 2012 19:17:22 -0400 Subject: [PATCH] ck_bytelock: read_lock must serialize all load/store before checking owner field. Thanks to Andrew Schorr for reporting the unit test failure. --- include/ck_bytelock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ck_bytelock.h b/include/ck_bytelock.h index c1c3374..ea6a138 100644 --- a/include/ck_bytelock.h +++ b/include/ck_bytelock.h @@ -148,7 +148,7 @@ ck_bytelock_read_lock(struct ck_bytelock *bytelock, unsigned int slot) slot -= 1; for (;;) { ck_pr_store_8(&bytelock->readers[slot], true); - ck_pr_fence_strict_store(); + ck_pr_fence_strict_memory(); /* * If there is no owner at this point, our slot has