Messages in this thread | | | Date | Thu, 12 Feb 2015 20:39:05 +0100 | From | Oleg Nesterov <> | Subject | Re: 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.
| |