loop4: detected capacity change from 0 to 1024 ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Tainted: G L ------------------------------------------------------ syz.4.2971/15644 is trying to acquire lock: ffff8880699aa0a8 (&tree->tree_lock/1){+.+.}-{4:4}, at: hfsplus_find_init+0x27c/0x410 fs/hfsplus/bfind.c:29 but task is already holding lock: ffff8880132c45c0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x21e/0xd60 fs/hfsplus/extents.c:579 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}: lock_acquire kernel/locking/lockdep.c:5886 [inline] lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5843 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a4/0x1bc0 kernel/locking/mutex.c:821 hfsplus_file_extend+0x1c9/0x1270 fs/hfsplus/extents.c:457 hfsplus_bmap_reserve+0x36a/0x4b0 fs/hfsplus/btree.c:512 __hfsplus_ext_write_extent+0x537/0x6d0 fs/hfsplus/extents.c:104 __hfsplus_ext_cache_extent+0x98/0x9d0 fs/hfsplus/extents.c:190 hfsplus_ext_read_extent+0x200/0x250 fs/hfsplus/extents.c:222 hfsplus_file_extend+0x79a/0x1270 fs/hfsplus/extents.c:461 hfsplus_get_block+0x1a9/0xab0 fs/hfsplus/extents.c:249 __block_write_begin_int+0x57a/0x19c0 fs/buffer.c:2030 block_write_begin+0x9d/0x1d0 fs/buffer.c:2144 cont_write_begin+0x573/0xa10 fs/buffer.c:2506 hfsplus_write_begin+0x158/0x250 fs/hfsplus/inode.c:56 generic_perform_write+0x292/0xa40 mm/filemap.c:4374 __generic_file_write_iter+0x1f7/0x240 mm/filemap.c:4491 generic_file_write_iter+0xe1/0x390 mm/filemap.c:4517 aio_write+0x3ba/0x920 fs/aio.c:1687 __io_submit_one fs/aio.c:2059 [inline] io_submit_one+0x1142/0x1fb0 fs/aio.c:2106 __do_sys_io_submit fs/aio.c:2165 [inline] __se_sys_io_submit fs/aio.c:2135 [inline] __x64_sys_io_submit+0x1b1/0x3a0 fs/aio.c:2135 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&tree->tree_lock/1){+.+.}-{4:4}: check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3181 check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x1492/0x1ec0 kernel/locking/lockdep.c:5253 lock_acquire kernel/locking/lockdep.c:5886 [inline] lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5843 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a4/0x1bc0 kernel/locking/mutex.c:821 hfsplus_find_init+0x27c/0x410 fs/hfsplus/bfind.c:29 hfsplus_file_truncate+0x2cb/0xd60 fs/hfsplus/extents.c:585 hfsplus_delete_inode+0x194/0x230 fs/hfsplus/inode.c:553 hfsplus_unlink+0x79c/0x9a0 fs/hfsplus/dir.c:420 vfs_unlink+0x2f0/0xbd0 fs/namei.c:5649 filename_unlinkat+0x408/0x730 fs/namei.c:5719 __do_sys_unlink fs/namei.c:5754 [inline] __se_sys_unlink fs/namei.c:5751 [inline] __x64_sys_unlink+0x46/0x70 fs/namei.c:5751 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock/1); lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock/1); *** DEADLOCK *** locks held by syz.4.2971/15644: 5, last CPU#0: #0: ffff88802f028460 (sb_writers#12){.+.+}-{0:0}, at: filename_unlinkat+0x1ad/0x730 fs/namei.c:5696 #1: ffff8880132c53d8 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1070 [inline] #1: ffff8880132c53d8 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2918 [inline] #1: ffff8880132c53d8 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2942 [inline] #1: ffff8880132c53d8 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: filename_unlinkat+0x262/0x730 fs/namei.c:5700 #2: ffff8880132c4758 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1025 [inline] #2: ffff8880132c4758 (&sb->s_type->i_mutex_key#24){+.+.}-{4:4}, at: vfs_unlink+0xd3/0xbd0 fs/namei.c:5635 #3: ffff88805dd5b188 (&sbi->vh_mutex){+.+.}-{4:4}, at: hfsplus_unlink+0x198/0x9a0 fs/hfsplus/dir.c:385 #4: ffff8880132c45c0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_truncate+0x21e/0xd60 fs/hfsplus/extents.c:579 stack backtrace: CPU: 0 UID: 0 PID: 15644 Comm: syz.4.2971 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1be kernel/locking/lockdep.c:2059 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2191 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3181 check_prevs_add kernel/locking/lockdep.c:3300 [inline] validate_chain kernel/locking/lockdep.c:3924 [inline] __lock_acquire+0x1492/0x1ec0 kernel/locking/lockdep.c:5253 lock_acquire kernel/locking/lockdep.c:5886 [inline] lock_acquire+0x1b9/0x370 kernel/locking/lockdep.c:5843 __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a4/0x1bc0 kernel/locking/mutex.c:821 hfsplus_find_init+0x27c/0x410 fs/hfsplus/bfind.c:29 hfsplus_file_truncate+0x2cb/0xd60 fs/hfsplus/extents.c:585 hfsplus_delete_inode+0x194/0x230 fs/hfsplus/inode.c:553 hfsplus_unlink+0x79c/0x9a0 fs/hfsplus/dir.c:420 vfs_unlink+0x2f0/0xbd0 fs/namei.c:5649 filename_unlinkat+0x408/0x730 fs/namei.c:5719 __do_sys_unlink fs/namei.c:5754 [inline] __se_sys_unlink fs/namei.c:5751 [inline] __x64_sys_unlink+0x46/0x70 fs/namei.c:5751 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fc9b7b9e0d9 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:00007fc9b8a13028 EFLAGS: 00000246 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007fc9b7e25fa0 RCX: 00007fc9b7b9e0d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00002000000000c0 RBP: 00007fc9b7c35024 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9b7e26038 R14: 00007fc9b7e25fa0 R15: 00007ffc14b47218 hfsplus: found bad thread record in catalog