Commit bccec2a0 authored by Christian Borntraeger's avatar Christian Borntraeger

x86/spinlock: Leftover conversion ACCESS_ONCE->READ_ONCE

commit 78bff1c8 ("x86/ticketlock: Fix spin_unlock_wait() livelock")
introduced two additional ACCESS_ONCE cases in x86 spinlock.h.
Lets change those as well.
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
parent 1760f1eb
...@@ -183,10 +183,10 @@ static __always_inline void arch_spin_lock_flags(arch_spinlock_t *lock, ...@@ -183,10 +183,10 @@ static __always_inline void arch_spin_lock_flags(arch_spinlock_t *lock,
static inline void arch_spin_unlock_wait(arch_spinlock_t *lock) static inline void arch_spin_unlock_wait(arch_spinlock_t *lock)
{ {
__ticket_t head = ACCESS_ONCE(lock->tickets.head); __ticket_t head = READ_ONCE(lock->tickets.head);
for (;;) { 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 * We need to check "unlocked" in a loop, tmp.head == head
* can be false positive because of overflow. * can be false positive because of overflow.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment