Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756067AbbBJNUq (ORCPT ); Tue, 10 Feb 2015 08:20:46 -0500 Received: from mail-qc0-f176.google.com ([209.85.216.176]:64694 "EHLO mail-qc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755380AbbBJNUp (ORCPT ); Tue, 10 Feb 2015 08:20:45 -0500 MIME-Version: 1.0 In-Reply-To: References: <1423234148-13886-1-git-send-email-raghavendra.kt@linux.vnet.ibm.com> <54D7D19B.1000103@goop.org> <54D87F1E.9060307@linux.vnet.ibm.com> <20150209120227.GT21418@twins.programming.kicks-ass.net> <54D9CFC7.5020007@linux.vnet.ibm.com> From: Denys Vlasenko Date: Tue, 10 Feb 2015 14:20:24 +0100 Message-ID: Subject: Re: [PATCH] x86 spinlock: Fix memory corruption on completing completions To: Raghavendra K T Cc: Linus Torvalds , Jeremy Fitzhardinge , Sasha Levin , Davidlohr Bueso , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Peter Anvin , Konrad Rzeszutek Wilk , Paolo Bonzini , Paul McKenney , Waiman Long , Dave Jones , Oleg Nesterov , "the arch/x86 maintainers" , Paul Gortmaker , Andi Kleen , Jason Wang , Linux Kernel Mailing List , KVM list , virtualization , xen-devel , Rik van Riel , Christian Borntraeger , Andrew Morton , Andrey Ryabinin Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 573 Lines: 16 On Tue, Feb 10, 2015 at 2:18 PM, Denys Vlasenko 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/