BTRFS info (device loop0): first mount of filesystem a6a605fc-d5f1-4e66-8595-3726e2b761d6 BTRFS info (device loop0): using blake2b (blake2b-256-generic) checksum algorithm BTRFS info (device loop0): using free-space-tree ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc2-next-20250620-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor512/5833 is trying to acquire lock: ffffffff8e6e9fe8 (uuid_mutex){+.+.}-{4:4}, at: btrfs_read_chunk_tree+0xef/0x2170 fs/btrfs/volumes.c:7462 but task is already holding lock: ffff8880330220e0 (&type->s_umount_key#41/1){+.+.}-{4:4}, at: alloc_super+0x204/0x970 fs/super.c:345 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&type->s_umount_key#41/1){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 down_write_nested+0x9d/0x200 kernel/locking/rwsem.c:1693 alloc_super+0x204/0x970 fs/super.c:345 sget_fc+0x329/0xa40 fs/super.c:761 btrfs_get_tree_super fs/btrfs/super.c:1867 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2059 [inline] btrfs_get_tree+0x4c6/0x12d0 fs/btrfs/super.c:2093 vfs_get_tree+0x8f/0x2b0 fs/super.c:1804 do_new_mount+0x24a/0xa40 fs/namespace.c:3902 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4427 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (uuid_mutex){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __mutex_lock_common kernel/locking/mutex.c:602 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747 btrfs_read_chunk_tree+0xef/0x2170 fs/btrfs/volumes.c:7462 open_ctree+0x17f2/0x3a10 fs/btrfs/disk-io.c:3458 btrfs_fill_super fs/btrfs/super.c:984 [inline] btrfs_get_tree_super fs/btrfs/super.c:1922 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2059 [inline] btrfs_get_tree+0xc6f/0x12d0 fs/btrfs/super.c:2093 vfs_get_tree+0x8f/0x2b0 fs/super.c:1804 do_new_mount+0x24a/0xa40 fs/namespace.c:3902 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4427 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&type->s_umount_key#41/1); lock(uuid_mutex); lock(&type->s_umount_key#41/1); lock(uuid_mutex); *** DEADLOCK *** 1 lock held by syz-executor512/5833: #0: ffff8880330220e0 (&type->s_umount_key#41/1){+.+.}-{4:4}, at: alloc_super+0x204/0x970 fs/super.c:345 stack backtrace: CPU: 0 UID: 0 PID: 5833 Comm: syz-executor512 Not tainted 6.16.0-rc2-next-20250620-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2046 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __mutex_lock_common kernel/locking/mutex.c:602 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747 btrfs_read_chunk_tree+0xef/0x2170 fs/btrfs/volumes.c:7462 open_ctree+0x17f2/0x3a10 fs/btrfs/disk-io.c:3458 btrfs_fill_super fs/btrfs/super.c:984 [inline] btrfs_get_tree_super fs/btrfs/super.c:1922 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2059 [inline] btrfs_get_tree+0xc6f/0x12d0 fs/btrfs/super.c:2093 vfs_get_tree+0x8f/0x2b0 fs/super.c:1804 do_new_mount+0x24a/0xa40 fs/namespace.c:3902 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4427 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc7b9403faa Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd6d6a3cd8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffd6d6a3cf0 RCX: 00007fc7b9403faa RDX: 0000200000000080 RSI: 00002000000000c0 RDI: 00007ffd6d6a3cf0 RBP: 00002000000000c0 R08: 00007ffd6d6a3d30 R09: 00000000000055db R10: 000000000001c005 R11: 0000000000000282 R12: 0000200000000080 R13: 0000000000000004 R14: 0000000000000003 R15: 00007ffd6d6a3d30 BTRFS error (device loop0): failed to load root extent BTRFS error (device loop0): failed to load root free space Oops: general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 1 UID: 0 PID: 5833 Comm: syz-executor512 Not tainted 6.16.0-rc2-next-20250620-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:btrfs_root_node+0x151/0x4a0 fs/btrfs/ctree.c:193 Code: 24 e8 73 50 02 fe c6 05 3f 67 cd 0b 01 48 c7 c7 a0 07 cd 8b be 4b 03 00 00 48 c7 c2 e0 07 cd 8b e8 a4 56 e0 fd 48 8b 44 24 18 <42> 80 3c 30 00 74 08 4c 89 e7 e8 20 7b 66 fe 4d 8b 2c 24 e8 47 57 RSP: 0018:ffffc90003e8f8a0 EFLAGS: 00010293 RAX: 0000000000000003 RBX: ffffffff83be07ee RCX: ffff888032200000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90003e8f960 R08: 0000000000000000 R09: 0000000000000000 R10: dffffc0000000000 R11: ffffed100e73d80e R12: 0000000000000018 R13: ffff8880335ebc00 R14: dffffc0000000000 R15: 0000000000000000 FS: 000055558d726380(0000) GS:ffff888125d26000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007faf2ba74d90 CR3: 00000000743fa000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_read_lock_root_node+0x27/0xd0 fs/btrfs/locking.c:263 btrfs_build_ref_tree+0x113/0x1680 fs/btrfs/ref-verify.c:988 open_ctree+0x2504/0x3a10 fs/btrfs/disk-io.c:3595 btrfs_fill_super fs/btrfs/super.c:984 [inline] btrfs_get_tree_super fs/btrfs/super.c:1922 [inline] btrfs_get_tree_subvol fs/btrfs/super.c:2059 [inline] btrfs_get_tree+0xc6f/0x12d0 fs/btrfs/super.c:2093 vfs_get_tree+0x8f/0x2b0 fs/super.c:1804 do_new_mount+0x24a/0xa40 fs/namespace.c:3902 do_mount fs/namespace.c:4239 [inline] __do_sys_mount fs/namespace.c:4450 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4427 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc7b9403faa Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd6d6a3cd8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffd6d6a3cf0 RCX: 00007fc7b9403faa RDX: 0000200000000080 RSI: 00002000000000c0 RDI: 00007ffd6d6a3cf0 RBP: 00002000000000c0 R08: 00007ffd6d6a3d30 R09: 00000000000055db R10: 000000000001c005 R11: 0000000000000282 R12: 0000200000000080 R13: 0000000000000004 R14: 0000000000000003 R15: 00007ffd6d6a3d30 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:btrfs_root_node+0x151/0x4a0 fs/btrfs/ctree.c:193 Code: 24 e8 73 50 02 fe c6 05 3f 67 cd 0b 01 48 c7 c7 a0 07 cd 8b be 4b 03 00 00 48 c7 c2 e0 07 cd 8b e8 a4 56 e0 fd 48 8b 44 24 18 <42> 80 3c 30 00 74 08 4c 89 e7 e8 20 7b 66 fe 4d 8b 2c 24 e8 47 57 RSP: 0018:ffffc90003e8f8a0 EFLAGS: 00010293 RAX: 0000000000000003 RBX: ffffffff83be07ee RCX: ffff888032200000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90003e8f960 R08: 0000000000000000 R09: 0000000000000000 R10: dffffc0000000000 R11: ffffed100e73d80e R12: 0000000000000018 R13: ffff8880335ebc00 R14: dffffc0000000000 R15: 0000000000000000 FS: 000055558d726380(0000) GS:ffff888125c26000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055a544b26768 CR3: 00000000743fa000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 24 e8 and $0xe8,%al 2: 73 50 jae 0x54 4: 02 fe add %dh,%bh 6: c6 05 3f 67 cd 0b 01 movb $0x1,0xbcd673f(%rip) # 0xbcd674c d: 48 c7 c7 a0 07 cd 8b mov $0xffffffff8bcd07a0,%rdi 14: be 4b 03 00 00 mov $0x34b,%esi 19: 48 c7 c2 e0 07 cd 8b mov $0xffffffff8bcd07e0,%rdx 20: e8 a4 56 e0 fd call 0xfde056c9 25: 48 8b 44 24 18 mov 0x18(%rsp),%rax * 2a: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) <-- trapping instruction 2f: 74 08 je 0x39 31: 4c 89 e7 mov %r12,%rdi 34: e8 20 7b 66 fe call 0xfe667b59 39: 4d 8b 2c 24 mov (%r12),%r13 3d: e8 .byte 0xe8 3e: 47 57 rex.RXB push %r15