============================================ WARNING: possible recursive locking detected 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 #0 Not tainted -------------------------------------------- syz-executor118/5831 is trying to acquire lock: ffff888032549548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_get_block+0x383/0x14f0 fs/hfsplus/extents.c:260 but task is already holding lock: ffff88807c2d0108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x30a/0xc70 fs/hfsplus/extents.c:577 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 4 locks held by syz-executor118/5831: #0: ffff888034920420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:547 #1: ffff88807c2d02f8 (&sb->s_type->i_mutex_key#15){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:877 [inline] #1: ffff88807c2d02f8 (&sb->s_type->i_mutex_key#15){+.+.}-{4:4}, at: do_truncate+0x20c/0x310 fs/open.c:63 #2: ffff88807c2d0108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x30a/0xc70 fs/hfsplus/extents.c:577 #3: ffff8880273450f8 (&sbi->alloc_mutex){+.+.}-{4:4}, at: hfsplus_block_free+0xbb/0x4e0 fs/hfsplus/bitmap.c:182 stack backtrace: CPU: 0 UID: 0 PID: 5831 Comm: syz-executor118 Not tainted 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 #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 hfsplus_get_block+0x383/0x14f0 fs/hfsplus/extents.c:260 block_read_full_folio+0x3f0/0xae0 fs/buffer.c:2396 filemap_read_folio+0x14a/0x3b0 mm/filemap.c:2400 do_read_cache_folio+0x373/0x5b0 mm/filemap.c:3884 do_read_cache_page mm/filemap.c:3950 [inline] read_cache_page+0x5b/0x170 mm/filemap.c:3959 read_mapping_page include/linux/pagemap.h:1017 [inline] hfsplus_block_free+0x128/0x4e0 fs/hfsplus/bitmap.c:185 hfsplus_free_extents+0x17a/0xae0 fs/hfsplus/extents.c:363 hfsplus_file_truncate+0x86c/0xc70 fs/hfsplus/extents.c:592 hfsplus_setattr+0x1bd/0x270 fs/hfsplus/inode.c:264 notify_change+0xbcc/0xe90 fs/attr.c:552 do_truncate+0x220/0x310 fs/open.c:65 handle_truncate fs/namei.c:3451 [inline] do_open fs/namei.c:3834 [inline] path_openat+0x2e1b/0x3590 fs/namei.c:3989 do_filp_open+0x27f/0x4e0 fs/namei.c:4016 do_sys_openat2+0x13e/0x1d0 fs/open.c:1428 do_sys_open fs/open.c:1443 [inline] __do_sys_creat fs/open.c:1521 [inline] __se_sys_creat fs/open.c:1515 [inline] __x64_sys_creat+0x123/0x170 fs/open.c:1515 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:0x7f5483fc9a99 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:00007ffcbfa8b4c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f5483fc9a99 RDX: 00007f5483fc8a91 RSI: 0000000000000022 RDI: 0000400000000000 RBP: 00007f548403d5f0 R08: 0000000000000640 R09: 0000555561e664c0 R10: 00007ffcbfa8b390 R11: 0000000000000246 R12: 00007ffcbfa8b4f0 R13: 00007ffcbfa8b718 R14: 431bde82d7b634db R15: 00007f548401203b hfsplus: unable to mark blocks free: error -5 hfsplus: can't free extent