bisecting fixing commit since fb683b5e3f53a73e761952735736180939a313df building syzkaller on 101194ebf6834198300032f6fb438f2c4cdf0401 testing commit fb683b5e3f53a73e761952735736180939a313df compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 02871360357ee479ccc6b052f402b4831042cec48aa9d4285eb3ebd4bb1f1934 all runs: crashed: kernel BUG in close_fs_devices testing current HEAD e34184f53363f6bb873c2fe0ce1a08ed7d16e94a testing commit e34184f53363f6bb873c2fe0ce1a08ed7d16e94a compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 446396da4cba39bcd6effb114db1f865ef99e8b5ae55c2309dfb7483580acec7 run #0: crashed: kernel BUG in close_fs_devices run #1: crashed: kernel BUG in close_fs_devices run #2: crashed: kernel BUG in close_fs_devices run #3: crashed: kernel BUG in close_fs_devices run #4: crashed: kernel BUG in close_fs_devices run #5: crashed: kernel BUG in close_fs_devices run #6: crashed: kernel BUG in corrupted run #7: crashed: kernel BUG in close_fs_devices run #8: crashed: kernel BUG in close_fs_devices run #9: crashed: kernel BUG in close_fs_devices revisions tested: 2, total time: 27m25.085846066s (build: 20m14.92909344s, test: 6m14.882475371s) the crash still happens on HEAD commit msg: Linux 4.19.210 crash: kernel BUG in close_fs_devices RBP: 00007f84c683d040 R08: 00007f84c683d080 R09: 00007f84c683d020 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 00000000004fd190 R14: 00000000004b6840 R15: 00007f84c683d6bc ------------[ cut here ]------------ kernel BUG at fs/btrfs/volumes.c:1061! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 6813 Comm: syz-executor.1 Not tainted 4.19.210-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:btrfs_close_one_device fs/btrfs/volumes.c:1061 [inline] RIP: 0010:close_fs_devices.part.48+0x51b/0x800 fs/btrfs/volumes.c:1085 Code: 6a 30 01 4c 89 f8 48 c1 e8 03 42 80 3c 20 00 0f 85 b4 01 00 00 48 8b bb c0 00 00 00 48 85 ff 0f 85 28 fc ff ff e9 1f fc ff ff <0f> 0b 0f 0b 4c 89 f7 e8 d9 df e6 fe e9 77 fb ff ff e8 cf df e6 fe RSP: 0018:ffff8881de0c7788 EFLAGS: 00010202 RAX: fffffffffffffff4 RBX: ffff8881de7be900 RCX: 1ffff1103a2d7952 RDX: 0000000000000000 RSI: ffff8881d16bca70 RDI: 0000000000000282 RBP: ffff8881de0c77f8 R08: ffff8881d16bca90 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8881e7561658 R14: ffff8881de7be920 R15: fffffffffffffff4 FS: 00007f84c683d700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055c3280ae140 CR3: 00000001e1451002 CR4: 00000000003606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: close_fs_devices fs/btrfs/volumes.c:1117 [inline] btrfs_close_devices+0x80/0x1b0 fs/btrfs/volumes.c:1103 btrfs_mount_root+0xeb4/0x16f0 fs/btrfs/super.c:1630 mount_fs+0x7f/0x2b0 fs/super.c:1261 vfs_kern_mount.part.34+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount+0xe/0x20 fs/namespace.c:947 btrfs_mount+0x219/0xc00 fs/btrfs/super.c:1681 mount_fs+0x7f/0x2b0 fs/super.c:1261 vfs_kern_mount.part.34+0x58/0x3d0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2492 [inline] do_mount+0x36e/0x2340 fs/namespace.c:2822 ksys_mount+0xb1/0xd0 fs/namespace.c:3038 __do_sys_mount fs/namespace.c:3052 [inline] __se_sys_mount fs/namespace.c:3049 [inline] __x64_sys_mount+0xb9/0x150 fs/namespace.c:3049 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4636da Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 88 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f84c683cfb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000052bf00 RCX: 00000000004636da RDX: 00007f84c683d020 RSI: 00000000200001c0 RDI: 00007f84c683d040 RBP: 00007f84c683d040 R08: 00007f84c683d080 R09: 00007f84c683d020 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 00000000004fd190 R14: 00000000004b6840 R15: 00007f84c683d6bc Modules linked in: ---[ end trace 9e035ae14c21e44b ]--- RIP: 0010:btrfs_close_one_device fs/btrfs/volumes.c:1061 [inline] RIP: 0010:close_fs_devices.part.48+0x51b/0x800 fs/btrfs/volumes.c:1085 Code: 6a 30 01 4c 89 f8 48 c1 e8 03 42 80 3c 20 00 0f 85 b4 01 00 00 48 8b bb c0 00 00 00 48 85 ff 0f 85 28 fc ff ff e9 1f fc ff ff <0f> 0b 0f 0b 4c 89 f7 e8 d9 df e6 fe e9 77 fb ff ff e8 cf df e6 fe RSP: 0018:ffff8881de0c7788 EFLAGS: 00010202 RAX: fffffffffffffff4 RBX: ffff8881de7be900 RCX: 1ffff1103a2d7952 RDX: 0000000000000000 RSI: ffff8881d16bca70 RDI: 0000000000000282 RBP: ffff8881de0c77f8 R08: ffff8881d16bca90 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8881e7561658 R14: ffff8881de7be920 R15: fffffffffffffff4 FS: 00007f84c683d700(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000528000 CR3: 00000001e1451002 CR4: 00000000003606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400