Re: [syzbot] kernel BUG in dev_args_match_device

From: David Sterba
Date: Wed Nov 02 2022 - 19:09:20 EST


On Wed, Nov 02, 2022 at 11:06:42AM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: b229b6ca5abb Merge tag 'perf-tools-fixes-for-v6.1-2022-10-..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1744c1fc880000
> kernel config: https://syzkaller.appspot.com/x/.config?x=1d3548a4365ba17d
> dashboard link: https://syzkaller.appspot.com/bug?extid=031687116258450f9853
> compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/24728b72a896/disk-b229b6ca.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/10a3c40c60e1/vmlinux-b229b6ca.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/69f963b02b7e/bzImage-b229b6ca.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+031687116258450f9853@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> ------------[ cut here ]------------
> kernel BUG at fs/btrfs/ctree.h:3710!

This is cut just before the assertion failed message but it's in the
full console log:

[ 1143.555887][ T2686] assertion failed: (args->devid != (u64)-1) || args->missing, in fs/btrfs/volumes.c:6921

6918 static bool dev_args_match_device(const struct btrfs_dev_lookup_args *args,
6919 const struct btrfs_device *device)
6920 {
6921 ASSERT((args->devid != (u64)-1) || args->missing);