============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.1.34/5944 is trying to acquire lock: ffff8880781900b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x17e/0x1f0 fs/hfs/bfind.c:-1 but task is already holding lock: ffff8880781900b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x17e/0x1f0 fs/hfs/bfind.c:-1 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tree->tree_lock/1); lock(&tree->tree_lock/1); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz.1.34/5944: #0: ffff88814c9f4418 (sb_writers#15){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:412 #1: ffff88805d4a9638 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline] #1: ffff88805d4a9638 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: do_truncate+0x19c/0x240 fs/open.c:64 #2: ffff88805d4a9478 (&HFS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xff/0x1380 fs/hfs/extent.c:397 #3: ffff8880781900b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x17e/0x1f0 fs/hfs/bfind.c:-1 #4: ffff88805d4a80f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xff/0x1380 fs/hfs/extent.c:397 stack backtrace: CPU: 1 PID: 5944 Comm: syz.1.34 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3856 [inline] __lock_acquire+0x5dbc/0x7d40 kernel/locking/lockdep.c:5137 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xcc0 kernel/locking/mutex.c:747 hfs_find_init+0x17e/0x1f0 fs/hfs/bfind.c:-1 hfs_ext_read_extent fs/hfs/extent.c:200 [inline] hfs_extend_file+0x361/0x1380 fs/hfs/extent.c:401 hfs_bmap_reserve+0x107/0x430 fs/hfs/btree.c:269 __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+0x3a0/0x1380 fs/hfs/extent.c:401 hfs_get_block+0x413/0xc50 fs/hfs/extent.c:353 __block_write_begin_int+0x57f/0x1af0 fs/buffer.c:2124 __block_write_begin fs/buffer.c:2173 [inline] block_write_begin+0x9a/0x1e0 fs/buffer.c:2234 cont_write_begin+0x5ee/0x810 fs/buffer.c:2591 hfs_write_begin+0x8b/0xd0 fs/hfs/inode.c:58 cont_expand_zero fs/buffer.c:2518 [inline] cont_write_begin+0x2b1/0x810 fs/buffer.c:2581 hfs_write_begin+0x8b/0xd0 fs/hfs/inode.c:58 hfs_file_truncate+0x1c4/0xa10 fs/hfs/extent.c:494 hfs_inode_setattr+0x4af/0x6e0 fs/hfs/inode.c:659 notify_change+0xb0d/0xe10 fs/attr.c:499 do_truncate+0x1b0/0x240 fs/open.c:66 vfs_truncate+0x266/0x300 fs/open.c:112 do_sys_truncate+0xf6/0x1c0 fs/open.c:135 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fd9ec59c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fd9ed385028 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 00007fd9ec815fa0 RCX: 00007fd9ec59c819 RDX: 0000000000000000 RSI: 0000000002fffffd RDI: 0000200000000940 RBP: 00007fd9ec632c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd9ec816038 R14: 00007fd9ec815fa0 R15: 00007ffc9840c948