commit 78bff1c8684f ("x86/ticketlock: Fix spin_unlock_wait() livelock")
introduced another ACCESS_ONCE case in x86 spinlock.h.

Change that as well.

Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com>
Cc: Oleg Nesterov <o...@redhat.com>
---
 arch/x86/include/asm/spinlock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
index 625660f..9264f0f 100644
--- a/arch/x86/include/asm/spinlock.h
+++ b/arch/x86/include/asm/spinlock.h
@@ -186,7 +186,7 @@ static inline void arch_spin_unlock_wait(arch_spinlock_t 
*lock)
        __ticket_t head = ACCESS_ONCE(lock->tickets.head);
 
        for (;;) {
-               struct __raw_tickets tmp = ACCESS_ONCE(lock->tickets);
+               struct __raw_tickets tmp = READ_ONCE(lock->tickets);
                /*
                 * We need to check "unlocked" in a loop, tmp.head == head
                 * can be false positive because of overflow.
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to