Re: [PATCH] zram: fix possible race when checking idle_strm

Sergey Senozhatsky
2015-08-11T08:24:53Z

On (08/11/15 17:25), Joonsoo Kim wrote:
[..]
> > "SLEEP AND WAKE-UP FUNCTIONS
> > ---------------------------
> >
> > Sleeping and waking on an event flagged in global data ...
> > ...
> > ...
> > ...
> >
> > A general memory barrier is interpolated automatically by set_current_state()
> > after it has altered the task state:"
> >
> > So I think your T1-7 assumption is not true.
> >
> > As well, there are many examples under drivers/ to use the global data
> > as event flag without locking or atomic.
> >
>
> Okay. Now, I'm convinced that race is not possible. I will drop this
> patch.

yep, Minchan found it first. thanks guys.

-ss