lkml.org 
[lkml]   [2015]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: spinlock bad magic on CPU#0, migration/0/9
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.



\
 
 \ /
  Last update: 2015-02-12 21:01    [W:0.070 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site