loop7: detected capacity change from 0 to 64 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.7.2550/16538 is trying to acquire lock: ffff88807c2660b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x15b/0x1d0 fs/hfs/bfind.c:-1 but task is already holding lock: ffff88805a390778 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_get_block+0x26b/0xc50 fs/hfs/extent.c:365 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}: __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfs_extend_file+0xfb/0x13f0 fs/hfs/extent.c:397 hfs_bmap_reserve+0x103/0x420 fs/hfs/btree.c:231 __hfs_ext_write_extent+0x1fa/0x470 fs/hfs/extent.c:121 __hfs_ext_cache_extent+0x6b/0x9b0 fs/hfs/extent.c:174 hfs_ext_read_extent fs/hfs/extent.c:202 [inline] hfs_extend_file+0x39c/0x13f0 fs/hfs/extent.c:401 hfs_get_block+0x40f/0xc50 fs/hfs/extent.c:353 __block_write_begin_int+0x565/0x15d0 fs/buffer.c:2012 __block_write_begin fs/buffer.c:2062 [inline] block_write_begin fs/buffer.c:2122 [inline] cont_write_begin+0x598/0x7b0 fs/buffer.c:2471 hfs_write_begin+0x92/0xe0 fs/hfs/inode.c:59 cont_expand_zero fs/buffer.c:2398 [inline] cont_write_begin+0x263/0x7b0 fs/buffer.c:2461 hfs_write_begin+0x92/0xe0 fs/hfs/inode.c:59 generic_perform_write+0x2b6/0x550 mm/filemap.c:3785 __generic_file_write_iter+0x25f/0x4e0 mm/filemap.c:3912 generic_file_write_iter+0xa6/0x1b0 mm/filemap.c:3944 call_write_iter include/linux/fs.h:2173 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x745/0xd60 fs/read_write.c:594 ksys_pwrite64 fs/read_write.c:701 [inline] __do_sys_pwrite64 fs/read_write.c:711 [inline] __se_sys_pwrite64 fs/read_write.c:708 [inline] __x64_sys_pwrite64+0x19a/0x220 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&tree->tree_lock/1){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfs_find_init+0x15b/0x1d0 fs/hfs/bfind.c:-1 hfs_ext_read_extent fs/hfs/extent.c:200 [inline] hfs_get_block+0x553/0xc50 fs/hfs/extent.c:366 block_read_full_page+0x306/0xd40 fs/buffer.c:2290 do_read_cache_page+0x8a1/0x1030 mm/filemap.c:-1 read_mapping_page include/linux/pagemap.h:515 [inline] __hfs_bnode_create+0x4f0/0xbd0 fs/hfs/bnode.c:395 hfs_bnode_find+0x220/0xd30 fs/hfs/bnode.c:444 hfs_brec_find+0x178/0x500 fs/hfs/bfind.c:132 hfs_brec_read+0x20/0x100 fs/hfs/bfind.c:171 hfs_cat_find_brec+0x174/0x3f0 fs/hfs/catalog.c:194 hfs_fill_super+0xfda/0x1590 fs/hfs/super.c:419 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&HFS_I(tree->inode)->extents_lock); lock(&tree->tree_lock/1); lock(&HFS_I(tree->inode)->extents_lock); lock(&tree->tree_lock/1); *** DEADLOCK *** 3 locks held by syz.7.2550/16538: #0: ffff88807c0640e0 (&type->s_umount_key#80/1){+.+.}-{3:3}, at: alloc_super+0x201/0x950 fs/super.c:229 #1: ffff88805901c0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfs_find_init+0x15b/0x1d0 fs/hfs/bfind.c:-1 #2: ffff88805a390778 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_get_block+0x26b/0xc50 fs/hfs/extent.c:365 stack backtrace: CPU: 1 PID: 16538 Comm: syz.7.2550 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c42/0x7d10 kernel/locking/lockdep.c:5012 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1e3/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfs_find_init+0x15b/0x1d0 fs/hfs/bfind.c:-1 hfs_ext_read_extent fs/hfs/extent.c:200 [inline] hfs_get_block+0x553/0xc50 fs/hfs/extent.c:366 block_read_full_page+0x306/0xd40 fs/buffer.c:2290 do_read_cache_page+0x8a1/0x1030 mm/filemap.c:-1 read_mapping_page include/linux/pagemap.h:515 [inline] __hfs_bnode_create+0x4f0/0xbd0 fs/hfs/bnode.c:395 hfs_bnode_find+0x220/0xd30 fs/hfs/bnode.c:444 hfs_brec_find+0x178/0x500 fs/hfs/bfind.c:132 hfs_brec_read+0x20/0x100 fs/hfs/bfind.c:171 hfs_cat_find_brec+0x174/0x3f0 fs/hfs/catalog.c:194 hfs_fill_super+0xfda/0x1590 fs/hfs/super.c:419 mount_bdev+0x287/0x3c0 fs/super.c:1400 legacy_get_tree+0xe6/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1530 do_new_mount+0x24a/0xa40 fs/namespace.c:3034 do_mount fs/namespace.c:3377 [inline] __do_sys_mount fs/namespace.c:3585 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3562 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f1abd46004a Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1abb6b7e58 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f1abb6b7ee0 RCX: 00007f1abd46004a RDX: 0000200000000180 RSI: 0000200000000000 RDI: 00007f1abb6b7ea0 RBP: 0000200000000180 R08: 00007f1abb6b7ee0 R09: 0000000001004002 R10: 0000000001004002 R11: 0000000000000246 R12: 0000200000000000 R13: 00007f1abb6b7ea0 R14: 0000000000000319 R15: 0000200000000040 hfs: get root inode failed