BTRFS info (device loop0): enabling ssd optimizations BTRFS info (device loop0): using spread ssd allocation scheme BTRFS info (device loop0): turning on sync discard BTRFS info (device loop0): using free space tree ============================================ WARNING: possible recursive locking detected 6.5.0-rc7-syzkaller-00004-gf7757129e3de-dirty #0 Not tainted -------------------------------------------- syz-executor.0/5436 is trying to acquire lock: ffff888021446678 (btrfs-tree-01){.+.+}-{3:3}, at: __btrfs_tree_read_lock+0x2f/0x220 fs/btrfs/locking.c:136 but task is already holding lock: ffff888021446678 (btrfs-tree-01){.+.+}-{3:3}, at: __btrfs_tree_read_lock+0x2f/0x220 fs/btrfs/locking.c:136 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(btrfs-tree-01); lock(btrfs-tree-01); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz-executor.0/5436: #0: ffff88802accc0e0 (&type->s_umount_key#50/1){+.+.}-{3:3}, at: alloc_super+0x217/0x920 fs/super.c:228 #1: ffff88802b3ca2d8 (&root->objectid_mutex){+.+.}-{3:3}, at: btrfs_init_fs_root fs/btrfs/disk-io.c:1127 [inline] #1: ffff88802b3ca2d8 (&root->objectid_mutex){+.+.}-{3:3}, at: btrfs_get_root_ref+0x5a6/0xae0 fs/btrfs/disk-io.c:1338 #2: ffff888021446678 (btrfs-tree-01){.+.+}-{3:3}, at: __btrfs_tree_read_lock+0x2f/0x220 fs/btrfs/locking.c:136 stack backtrace: CPU: 0 PID: 5436 Comm: syz-executor.0 Not tainted 6.5.0-rc7-syzkaller-00004-gf7757129e3de-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3070 [inline] validate_chain kernel/locking/lockdep.c:3863 [inline] __lock_acquire+0x6a81/0x7f70 kernel/locking/lockdep.c:5144 lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5761 down_read_nested+0x49/0x2f0 kernel/locking/rwsem.c:1645 __btrfs_tree_read_lock+0x2f/0x220 fs/btrfs/locking.c:136 btrfs_tree_read_lock fs/btrfs/locking.c:142 [inline] btrfs_read_lock_root_node+0x292/0x3c0 fs/btrfs/locking.c:281 btrfs_search_slot_get_root fs/btrfs/ctree.c:1832 [inline] btrfs_search_slot+0x4ff/0x31d0 fs/btrfs/ctree.c:2155 btrfs_init_root_free_objectid+0x148/0x320 fs/btrfs/disk-io.c:4955 btrfs_init_fs_root fs/btrfs/disk-io.c:1128 [inline] btrfs_get_root_ref+0x5ae/0xae0 fs/btrfs/disk-io.c:1338 btrfs_get_fs_root fs/btrfs/disk-io.c:1390 [inline] open_ctree+0x29c8/0x3030 fs/btrfs/disk-io.c:3494 btrfs_fill_super+0x1c7/0x2f0 fs/btrfs/super.c:1154 btrfs_mount_root+0x7e0/0x910 fs/btrfs/super.c:1519 legacy_get_tree+0xef/0x190 fs/fs_context.c:611 vfs_get_tree+0x8c/0x270 fs/super.c:1519 fc_mount fs/namespace.c:1112 [inline] vfs_kern_mount+0xbc/0x150 fs/namespace.c:1142 btrfs_mount+0x39f/0xb50 fs/btrfs/super.c:1579 legacy_get_tree+0xef/0x190 fs/fs_context.c:611 vfs_get_tree+0x8c/0x270 fs/super.c:1519 do_new_mount+0x28f/0xae0 fs/namespace.c:3335 do_mount fs/namespace.c:3675 [inline] __do_sys_mount fs/namespace.c:3884 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3861 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fb69647e1ea Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb69720dee8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fb69720df80 RCX: 00007fb69647e1ea RDX: 00000000200055c0 RSI: 0000000020005600 RDI: 00007fb69720df40 RBP: 00000000200055c0 R08: 00007fb69720df80 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000020005600 R13: 00007fb69720df40 R14: 00000000000055a8 R15: 00000000200013c0