============================================ WARNING: possible recursive locking detected 6.12.0-rc3-syzkaller-00007-g6485cf5ea253 #0 Not tainted -------------------------------------------- syz-executor290/5227 is trying to acquire lock: ffff88802c921548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x383/0x14f0 fs/hfsplus/extents.c:260 but task is already holding lock: ffff88802c9207c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x21b/0x1b70 fs/hfsplus/extents.c:458 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&HFSPLUS_I(inode)->extents_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by syz-executor290/5227: #0: ffff88802ea4a420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:515 #1: ffff88802c921df8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:850 [inline] #1: ffff88802c921df8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: lock_rename fs/namei.c:3161 [inline] #1: ffff88802c921df8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0x62c/0x13f0 fs/namei.c:5105 #2: ffff88802c923238 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:815 [inline] #2: ffff88802c923238 (&sb->s_type->i_mutex_key#14){+.+.}-{3:3}, at: lock_two_nondirectories+0xe1/0x170 fs/inode.c:1211 #3: ffff88802c9238f8 (&sb->s_type->i_mutex_key#14/4){+.+.}-{3:3}, at: vfs_rename+0x6a2/0xf00 fs/namei.c:4984 #4: ffff88802ea4e0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x14a/0x1c0 fs/hfsplus/bfind.c:28 #5: ffff88802c9207c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x21b/0x1b70 fs/hfsplus/extents.c:458 #6: ffff888027a228f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_allocate+0x9e/0x8c0 fs/hfsplus/bitmap.c:35 stack backtrace: CPU: 0 UID: 0 PID: 5227 Comm: syz-executor290 Not tainted 6.12.0-rc3-syzkaller-00007-g6485cf5ea253 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 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:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 hfsplus_get_block+0x383/0x14f0 fs/hfsplus/extents.c:260 block_read_full_folio+0x418/0xcd0 fs/buffer.c:2401 filemap_read_folio+0x14b/0x630 mm/filemap.c:2367 do_read_cache_folio+0x3f5/0x850 mm/filemap.c:3825 do_read_cache_page+0x30/0x200 mm/filemap.c:3891 read_mapping_page include/linux/pagemap.h:1005 [inline] hfsplus_block_allocate+0xee/0x8c0 fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0xade/0x1b70 fs/hfsplus/extents.c:469 hfsplus_bmap_reserve+0x105/0x4e0 fs/hfsplus/btree.c:358 hfsplus_rename_cat+0x1d0/0x1090 fs/hfsplus/catalog.c:456 hfsplus_rename+0x12e/0x1c0 fs/hfsplus/dir.c:552 vfs_rename+0xbdb/0xf00 fs/namei.c:5013 do_renameat2+0xd94/0x13f0 fs/namei.c:5170 __do_sys_renameat2 fs/namei.c:5204 [inline] __se_sys_renameat2 fs/namei.c:5201 [inline] __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5201 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:0x7f8764833f59 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 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:00007ffe306ec438 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f876487d6d8 RCX: 00007f8764833f59 RDX: 0000000000000006 RSI: 0000000020000080 RDI: 00000000ffffff9c RBP: 00007f87648a85f0 R08: 0000000000000000 R09: 0000555570ecc4c0 R10: 0000000020000980 R11: 0000000000000246 R12: 00007ffe306ec460 R13: 00007ffe306ec688 R14: 431bde82d7b634db R15: 00007f876487d03b