Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752580AbbBLTlY (ORCPT ); Thu, 12 Feb 2015 14:41:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55223 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbbBLTlX (ORCPT ); Thu, 12 Feb 2015 14:41:23 -0500 Date: Thu, 12 Feb 2015 20:39:05 +0100 From: Oleg Nesterov To: Nicholas Mc Guire Cc: Davidlohr Bueso , paulmck@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, waiman.long@hp.com, peterz@infradead.org, raghavendra.kt@linux.vnet.ibm.com Subject: Re: BUG: spinlock bad magic on CPU#0, migration/0/9 Message-ID: <20150212193905.GB28499@redhat.com> References: <20150212003430.GA28656@linux.vnet.ibm.com> <1423710911.2046.50.camel@stgolabs.net> <20150212172805.GA20850@redhat.com> <20150212174144.GA21714@redhat.com> <20150212193210.GA7244@opentech.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150212193210.GA7244@opentech.at> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 908 Lines: 27 On 02/12, Nicholas Mc Guire wrote: > > On Thu, 12 Feb 2015, Oleg Nesterov wrote: > > > --- x/kernel/sched/completion.c > > +++ x/kernel/sched/completion.c > > @@ -274,7 +274,7 @@ bool try_wait_for_completion(struct comp > > * first without taking the lock so we can > > * return early in the blocking case. > > */ > > - if (!ACCESS_ONCE(x->done)) > > + if (!READ_ONCE(x->done)) > > return 0; > > > from looking at compiler.h I don't think that there would be a difference > between ACCESS_ONCE() and READ_ONCE() in this case Yes, this is unrelated "while at it" cosmetic change, now that we have READ_ONCE() it makes more sense in this case. Oleg. -- 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/