loop1: detected capacity change from 0 to 1024 ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc7-syzkaller-00254-g528dd46d0fc3 #0 Not tainted ------------------------------------------------------ syz.1.530/7304 is trying to acquire lock: ffff88802be38e88 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x277/0x9e0 fs/hfsplus/extents.c:260 but task is already holding lock: ffff88802bf3a0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a7/0x200 fs/hfsplus/bfind.c:30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&tree->tree_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 hfsplus_file_truncate+0x886/0x9e0 fs/hfsplus/extents.c:595 hfsplus_delete_inode+0x18f/0x220 fs/hfsplus/inode.c:450 hfsplus_unlink+0x583/0x7f0 fs/hfsplus/dir.c:405 vfs_unlink+0x2fe/0x9b0 fs/namei.c:4349 do_unlinkat+0x5c0/0x750 fs/namei.c:4413 __do_sys_unlink fs/namei.c:4461 [inline] __se_sys_unlink fs/namei.c:4459 [inline] __x64_sys_unlink+0xc7/0x110 fs/namei.c:4459 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 hfsplus_get_block+0x277/0x9e0 fs/hfsplus/extents.c:260 block_read_full_folio+0x392/0xa70 fs/buffer.c:2407 filemap_read_folio+0xe8/0x2c0 mm/filemap.c:2355 do_read_cache_folio+0x203/0x540 mm/filemap.c:3789 do_read_cache_page mm/filemap.c:3855 [inline] read_cache_page+0x5b/0x160 mm/filemap.c:3864 read_mapping_page include/linux/pagemap.h:907 [inline] __hfs_bnode_create+0x63e/0x870 fs/hfsplus/bnode.c:440 hfsplus_bnode_find+0x2c8/0xcb0 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b9/0x520 fs/hfsplus/bfind.c:183 hfsplus_brec_read+0x2d/0x120 fs/hfsplus/bfind.c:222 hfsplus_find_cat+0x1e3/0x4d0 fs/hfsplus/catalog.c:202 hfsplus_iget+0x3bd/0x7a0 fs/hfsplus/super.c:82 hfsplus_fill_super+0xca8/0x1bc0 fs/hfsplus/super.c:509 mount_bdev+0x1e6/0x2d0 fs/super.c:1668 legacy_get_tree+0x10c/0x220 fs/fs_context.c:662 vfs_get_tree+0x92/0x380 fs/super.c:1789 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** 2 locks held by syz.1.530/7304: #0: ffff8880617860e0 (&type->s_umount_key#87/1){+.+.}-{3:3}, at: alloc_super+0x23d/0xbd0 fs/super.c:344 #1: ffff88802bf3a0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a7/0x200 fs/hfsplus/bfind.c:30 stack backtrace: CPU: 0 PID: 7304 Comm: syz.1.530 Not tainted 6.10.0-rc7-syzkaller-00254-g528dd46d0fc3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 hfsplus_get_block+0x277/0x9e0 fs/hfsplus/extents.c:260 block_read_full_folio+0x392/0xa70 fs/buffer.c:2407 filemap_read_folio+0xe8/0x2c0 mm/filemap.c:2355 do_read_cache_folio+0x203/0x540 mm/filemap.c:3789 do_read_cache_page mm/filemap.c:3855 [inline] read_cache_page+0x5b/0x160 mm/filemap.c:3864 read_mapping_page include/linux/pagemap.h:907 [inline] __hfs_bnode_create+0x63e/0x870 fs/hfsplus/bnode.c:440 hfsplus_bnode_find+0x2c8/0xcb0 fs/hfsplus/bnode.c:486 hfsplus_brec_find+0x2b9/0x520 fs/hfsplus/bfind.c:183 hfsplus_brec_read+0x2d/0x120 fs/hfsplus/bfind.c:222 hfsplus_find_cat+0x1e3/0x4d0 fs/hfsplus/catalog.c:202 hfsplus_iget+0x3bd/0x7a0 fs/hfsplus/super.c:82 hfsplus_fill_super+0xca8/0x1bc0 fs/hfsplus/super.c:509 mount_bdev+0x1e6/0x2d0 fs/super.c:1668 legacy_get_tree+0x10c/0x220 fs/fs_context.c:662 vfs_get_tree+0x92/0x380 fs/super.c:1789 do_new_mount fs/namespace.c:3352 [inline] path_mount+0x14e6/0x1f20 fs/namespace.c:3679 do_mount fs/namespace.c:3692 [inline] __do_sys_mount fs/namespace.c:3898 [inline] __se_sys_mount fs/namespace.c:3875 [inline] __x64_sys_mount+0x297/0x320 fs/namespace.c:3875 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f18bf5772da Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 7e 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:00007f18c0424e78 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f18c0424f00 RCX: 00007f18bf5772da RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007f18c0424ec0 RBP: 0000000020000040 R08: 00007f18c0424f00 R09: 0000000002000010 R10: 0000000002000010 R11: 0000000000000206 R12: 0000000020000080 R13: 00007f18c0424ec0 R14: 00000000000006b3 R15: 00000000200013c0 hfsplus: failed to load root directory