lkml.org 
[lkml]   [2018]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: INFO: task hung in wb_shutdown (2)
On Tue, May 1, 2018 at 3:27 AM Tetsuo Handa <
penguin-kernel@i-love.sakura.ne.jp> wrote:

> Can you review this patch? syzbot has hit this bug for nearly 4000 times
but
> is still unable to find a reproducer. Therefore, the only way to test
would be
> to apply this patch upstream and test whether the problem is solved.

Looks ok to me, except:

> > smp_wmb();
> > clear_bit(WB_shutting_down, &wb->state);
> > + smp_mb(); /* advised by wake_up_bit() */
> > + wake_up_bit(&wb->state, WB_shutting_down);

This whole sequence really should just be a pattern with a helper function.

And honestly, the pattern probably *should* be

clear_bit_unlock(bit, &mem);
smp_mb__after_atomic()
wake_up_bit(&mem, bit);

which looks like it is a bit cleaner wrt memory ordering rules.

Linus

\
 
 \ /
  Last update: 2018-05-01 18:07    [W:0.053 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site