Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions

From: Denys Vlasenko
Date: Tue Feb 10 2015 - 08:20:49 EST


On Tue, Feb 10, 2015 at 2:18 PM, Denys Vlasenko
<vda.linux@xxxxxxxxxxxxxx> wrote:
> while (1) {
> if (READ_ONCE(lock->tickets.head) != TICKET_TAIL(val))
> cpu_relax();
> }

Doh.... should be

while (READ_ONCE(lock->tickets.head) != TICKET_TAIL(val)
cpu_relax();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/