====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc3-next-20250624-syzkaller #0 Not tainted ------------------------------------------------------ syz.1.7/5961 is trying to acquire lock: ffffffff8e6e8cc8 (uuid_mutex){+.+.}-{4:4}, at: btrfs_read_chunk_tree+0xef/0x2170 fs/btrfs/volumes.c:7462 but task is already holding lock: ffff88802d92e0e0 (&type->s_umount_key#52/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#52/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+0x92/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+0x92/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#52/1); lock(uuid_mutex); lock(&type->s_umount_key#52/1); lock(uuid_mutex); *** DEADLOCK *** 1 lock held by syz.1.7/5961: #0: ffff88802d92e0e0 (&type->s_umount_key#52/1){+.+.}-{4:4}, at: alloc_super+0x204/0x970 fs/super.c:345 stack backtrace: CPU: 0 UID: 0 PID: 5961 Comm: syz.1.7 Not tainted 6.16.0-rc3-next-20250624-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+0x92/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:0x7ff3eb3900ca Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff3ec20de68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff3ec20def0 RCX: 00007ff3eb3900ca RDX: 00002000000051c0 RSI: 0000200000005200 RDI: 00007ff3ec20deb0 RBP: 00002000000051c0 R08: 00007ff3ec20def0 R09: 0000000001204408 R10: 0000000001204408 R11: 0000000000000246 R12: 0000200000005200 R13: 00007ff3ec20deb0 R14: 00000000000051ab R15: 00002000000000c0 BTRFS info (device loop1): rebuilding free space tree BTRFS info (device loop1): disabling free space tree BTRFS info (device loop1): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1) BTRFS info (device loop1): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2) BTRFS info (device loop1): balance: start -f -svrange=4611686018427387912..9223372036854775809,limit=46533..0 BTRFS info (device loop1): balance: ended with status: 0