hfs: continuing without an alternate MDB ============================================ WARNING: possible recursive locking detected 6.14.0-rc4-syzkaller-00278-gece144f151ac #0 Not tainted -------------------------------------------- syz-executor332/5823 is trying to acquire lock: ffff888059e820b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x16e/0x1f0 but task is already holding lock: ffff888059e820b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x16e/0x1f0 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-executor332/5823: #0: ffff888059ed6420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:547 #1: ffff888058799620 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline] #1: ffff888058799620 (&sb->s_type->i_mutex_key#14){+.+.}-{4:4}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff888058799478 (&HFS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xff/0x13e0 fs/hfs/extent.c:397 #3: ffff888059e820b0 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfs_find_init+0x16e/0x1f0 #4: ffff8880587980f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{4:4}, at: hfs_extend_file+0xff/0x13e0 fs/hfs/extent.c:397 stack backtrace: CPU: 0 UID: 0 PID: 5823 Comm: syz-executor332 Not tainted 6.14.0-rc4-syzkaller-00278-gece144f151ac #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3039 check_deadlock kernel/locking/lockdep.c:3091 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3893 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730 hfs_find_init+0x16e/0x1f0 hfs_ext_read_extent fs/hfs/extent.c:200 [inline] hfs_extend_file+0x31b/0x13e0 fs/hfs/extent.c:401 hfs_bmap_reserve+0xd9/0x400 fs/hfs/btree.c:234 __hfs_ext_write_extent+0x22e/0x4f0 fs/hfs/extent.c:121 __hfs_ext_cache_extent+0x6a/0x990 fs/hfs/extent.c:174 hfs_ext_read_extent fs/hfs/extent.c:202 [inline] hfs_extend_file+0x344/0x13e0 fs/hfs/extent.c:401 hfs_get_block+0x3e4/0xb60 fs/hfs/extent.c:353 __block_write_begin_int+0x692/0x19a0 fs/buffer.c:2116 block_write_begin fs/buffer.c:2226 [inline] cont_write_begin+0x77f/0xb40 fs/buffer.c:2577 hfs_write_begin+0x68/0xb0 fs/hfs/inode.c:52 cont_expand_zero fs/buffer.c:2504 [inline] cont_write_begin+0x32b/0xb40 fs/buffer.c:2567 hfs_write_begin+0x68/0xb0 fs/hfs/inode.c:52 hfs_file_truncate+0x1ed/0xa20 fs/hfs/extent.c:494 hfs_inode_setattr+0x458/0x620 fs/hfs/inode.c:654 notify_change+0xbca/0xe90 fs/attr.c:552 do_truncate+0x220/0x310 fs/open.c:65 vfs_truncate+0x492/0x530 fs/open.c:115 do_sys_truncate+0xdb/0x190 fs/open.c:138 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc55b0419f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc8ccb0058 EFLAGS: 00000246 ORIG_RAX: 000000000000004c RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007fc55b0419f9 RDX: 00007fc55b0419f9 RSI: 00000000087ffffe RDI: 0000400000000080 RBP: 00007fc55b08a05e R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000002f8 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc8ccb0238 R14: 0000000000000001 R15: 0000000000000001