public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: syzbot <syzbot+4cfe71a4da060be47502@syzkaller.appspotmail.com>
Cc: clm@fb.com, dsterba@suse.com, josef@toxicpanda.com,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: WARNING in close_fs_devices (2)
Date: Fri, 18 Sep 2020 14:31:33 +0200	[thread overview]
Message-ID: <20200918123133.GD6756@twin.jikos.cz> (raw)
In-Reply-To: <0000000000008fbadb05af94b61e@google.com>

On Fri, Sep 18, 2020 at 04:22:16AM -0700, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    e4c26faa Merge tag 'usb-5.9-rc5' of git://git.kernel.org/p..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=15bf1621900000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=c61610091f4ca8c4
> dashboard link: https://syzkaller.appspot.com/bug?extid=4cfe71a4da060be47502
> compiler:       gcc (GCC) 10.1.0-syz 20200507
> 
> Unfortunately, I don't have any reproducer for this issue yet.
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+4cfe71a4da060be47502@syzkaller.appspotmail.com
> 
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 3612 at fs/btrfs/volumes.c:1166 close_fs_devices.part.0+0x607/0x800 fs/btrfs/volumes.c:1166

1152 static int close_fs_devices(struct btrfs_fs_devices *fs_devices)
1153 {
1154         struct btrfs_device *device, *tmp;
1155
1156         if (--fs_devices->opened > 0)
1157                 return 0;
1158
1159         mutex_lock(&fs_devices->device_list_mutex);
1160         list_for_each_entry_safe(device, tmp, &fs_devices->devices, dev_list) {
1161                 btrfs_close_one_device(device);
1162         }
1163         mutex_unlock(&fs_devices->device_list_mutex);
1164
1165         WARN_ON(fs_devices->open_devices);
1166         WARN_ON(fs_devices->rw_devices);

1167         fs_devices->opened = 0;
1168         fs_devices->seeding = false;
1169
1170         return 0;
1171 }

It's the 2nd warning, rw_devices > 0 .

> Kernel panic - not syncing: panic_on_warn set ...
> CPU: 1 PID: 3612 Comm: syz-executor.2 Not tainted 5.9.0-rc4-syzkaller #0

5.9-rc4, we've had some changes around device locking but no idea which
one it could be.

  reply	other threads:[~2020-09-18 12:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 11:22 WARNING in close_fs_devices (2) syzbot
2020-09-18 12:31 ` David Sterba [this message]
2020-09-20 22:42 ` syzbot
2020-09-21  7:57   ` Anand Jain
2020-09-21  8:02     ` Johannes Thumshirn
2020-09-21 17:01 ` David Sterba
2020-09-21 20:44   ` syzbot
2020-09-22 12:37 ` Anand Jain
2020-10-30 10:10   ` Dmitry Vyukov
2020-10-30 12:25     ` David Sterba
2020-10-30 13:58     ` Anand Jain
2020-10-30 18:36       ` Dmitry Vyukov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200918123133.GD6756@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+4cfe71a4da060be47502@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox