From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f67.google.com ([209.85.214.67]:37665 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754484AbeFMQZP (ORCPT ); Wed, 13 Jun 2018 12:25:15 -0400 MIME-Version: 1.0 References: <2b437c6f-3e10-3d83-bdf3-82075d3eaa1a@i-love.sakura.ne.jp> <3cf4b0e3-31b6-8cdc-7c1e-15ba575a7879@i-love.sakura.ne.jp> <20180611091248.2i6nt27h5mxrodm2@quack2.suse.cz> <20180611160131.GQ1351649@devbig577.frc2.facebook.com> <20180611162920.mwapvuqotvhkntt3@quack2.suse.cz> <20180611172053.GR1351649@devbig577.frc2.facebook.com> <20180612155754.x5k2yndh5t6wlmpy@quack2.suse.cz> <20180613144606.nvbcyg2rdjpxhf7s@quack2.suse.cz> <7f4ae045-dfe4-6677-7418-f6f60b6c26f1@i-love.sakura.ne.jp> In-Reply-To: <7f4ae045-dfe4-6677-7418-f6f60b6c26f1@i-love.sakura.ne.jp> From: Linus Torvalds Date: Wed, 13 Jun 2018 09:25:03 -0700 Message-ID: Subject: Re: [PATCH] bdi: Fix another oops in wb_workfn() To: Tetsuo Handa Cc: Jan Kara , Tejun Heo , Dmitry Vyukov , Jens Axboe , syzbot+4a7438e774b21ddd8eca@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com, linux-fsdevel , Linux Kernel Mailing List , Al Viro , Dave Chinner , linux-block Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jun 13, 2018 at 9:21 AM Tetsuo Handa wrote: > > Since multiple addresses share bit_wait_table[256], isn't it possible that > cgwb_start_shutdown() prematurely returns false due to wake_up_bit() by > hash-conflicting addresses (i.e. not limited to clear_and_wake_up_bit() from > wb_shutdown())? I think that we cannot be sure without confirming that > test_bit(WB_shutting_down, &wb->state) == false after returning from schedule(). Right. That's _always_ true, btw. Something else entirely could have woken you up. TASK_UNINTERRUPTIBLE does not mean "nothing else wakes me", it just means "_signals_ don't wake me". So every single sleep always needs to be in a loop. Always. Linus