loop3: detected capacity change from 0 to 1024 ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc1-syzkaller-00021-ge0cce98fe279 #0 Not tainted ------------------------------------------------------ syz-executor183/5463 is trying to acquire lock: ffff88802ba93708 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x277/0x9e0 fs/hfsplus/extents.c:260 but task is already holding lock: ffff88801eeb20b0 (&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_setattr+0x1eb/0x310 fs/hfsplus/inode.c:265 notify_change+0x745/0x11f0 fs/attr.c:497 do_truncate+0x15c/0x220 fs/open.c:65 vfs_truncate+0x3ef/0x4e0 fs/open.c:111 do_sys_truncate fs/open.c:134 [inline] __do_sys_truncate fs/open.c:146 [inline] __se_sys_truncate fs/open.c:144 [inline] __x64_sys_truncate+0x177/0x1f0 fs/open.c:144 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:3788 do_read_cache_page mm/filemap.c:3854 [inline] read_cache_page+0x5b/0x160 mm/filemap.c:3863 read_mapping_page include/linux/pagemap.h:896 [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:1659 legacy_get_tree+0x10c/0x220 fs/fs_context.c:662 vfs_get_tree+0x92/0x380 fs/super.c:1780 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-executor183/5463: #0: ffff88807970a0e0 (&type->s_umount_key#42/1){+.+.}-{3:3}, at: alloc_super+0x23d/0xbd0 fs/super.c:344 #1: ffff88801eeb20b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x1a7/0x200 fs/hfsplus/bfind.c:30 stack backtrace: CPU: 1 PID: 5463 Comm: syz-executor183 Not tainted 6.10.0-rc1-syzkaller-00021-ge0cce98fe279 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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:3788 do_read_cache_page mm/filemap.c:3854 [inline] read_cache_page+0x5b/0x160 mm/filemap.c:3863 read_mapping_page include/linux/pagemap.h:896 [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:1659 legacy_get_tree+0x10c/0x220 fs/fs_context.c:662 vfs_get_tree+0x92/0x380 fs/super.c:1780 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:0x7f844067169a 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:00007ffdf422cba8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffdf422cbd0 RCX: 00007f844067169a RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffdf422cbd0 RBP: 00007ffdf422cc10 R08: 00007ffdf422cc10 R09: 0000000000000646 R10: 000000000000005a R11: 0000000000000286 R12: 000000000000064c R13: 0000000000000003 R14: 0000000000080000 R15: 000000000000064a hfsplus: failed to load root directory