lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 1 May 2018 15:30:59 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     Jan Kara <jack@...e.cz>, Tejun Heo <tj@...nel.org>,
        syzbot+c0cf869505e03bdf1a24@...kaller.appspotmail.com,
        christophe.jaillet@...adoo.fr,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-mm <linux-mm@...ck.org>, syzkaller-bugs@...glegroups.com,
        zhangweiping@...ichuxing.com,
        Andrew Morton <akpm@...ux-foundation.org>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        linux-block <linux-block@...r.kernel.org>
Subject: Re: INFO: task hung in wb_shutdown (2)

On 5/1/18 10:06 AM, Linus Torvalds wrote:
> On Tue, May 1, 2018 at 3:27 AM Tetsuo Handa <
> penguin-kernel@...ove.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.

Agree, that construct looks saner than introducing a "random"
smp_mb(). As a pattern helper, should probably be introduced
after the fact.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ