Warning: Permanently added '10.128.0.72' (ED25519) to the list of known hosts. executing program [ 42.844438][ T3500] loop0: detected capacity change from 0 to 1024 [ 42.876502][ T3500] [ 42.878863][ T3500] ====================================================== [ 42.885879][ T3500] WARNING: possible circular locking dependency detected [ 42.893000][ T3500] 5.15.145-syzkaller #0 Not tainted [ 42.898172][ T3500] ------------------------------------------------------ [ 42.905164][ T3500] syz-executor139/3500 is trying to acquire lock: [ 42.911551][ T3500] ffff8880790e07c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d2/0x1b10 [ 42.922751][ T3500] [ 42.922751][ T3500] but task is already holding lock: [ 42.930087][ T3500] ffff888079ac00b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 [ 42.939541][ T3500] [ 42.939541][ T3500] which lock already depends on the new lock. [ 42.939541][ T3500] [ 42.949919][ T3500] [ 42.949919][ T3500] the existing dependency chain (in reverse order) is: [ 42.958906][ T3500] [ 42.958906][ T3500] -> #1 (&tree->tree_lock){+.+.}-{3:3}: [ 42.966806][ T3500] lock_acquire+0x1db/0x4f0 [ 42.971820][ T3500] __mutex_lock_common+0x1da/0x25a0 [ 42.977517][ T3500] mutex_lock_nested+0x17/0x20 [ 42.982788][ T3500] hfsplus_file_truncate+0x864/0xb80 [ 42.988594][ T3500] hfsplus_setattr+0x1b9/0x280 [ 42.993868][ T3500] notify_change+0xc6d/0xf50 [ 42.998949][ T3500] do_truncate+0x21c/0x300 [ 43.003859][ T3500] path_openat+0x28a0/0x2f20 [ 43.008946][ T3500] do_filp_open+0x21c/0x460 [ 43.013939][ T3500] do_sys_openat2+0x13b/0x500 [ 43.019111][ T3500] __x64_sys_creat+0x11f/0x160 [ 43.024365][ T3500] do_syscall_64+0x3d/0xb0 [ 43.029276][ T3500] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.035667][ T3500] [ 43.035667][ T3500] -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 43.044753][ T3500] validate_chain+0x1649/0x5930 [ 43.050114][ T3500] __lock_acquire+0x1295/0x1ff0 [ 43.055455][ T3500] lock_acquire+0x1db/0x4f0 [ 43.060450][ T3500] __mutex_lock_common+0x1da/0x25a0 [ 43.066146][ T3500] mutex_lock_nested+0x17/0x20 [ 43.071403][ T3500] hfsplus_file_extend+0x1d2/0x1b10 [ 43.077094][ T3500] hfsplus_bmap_reserve+0x101/0x4e0 [ 43.082782][ T3500] hfsplus_rename_cat+0x1cf/0x1090 [ 43.088405][ T3500] hfsplus_rename+0x12a/0x1b0 [ 43.093592][ T3500] vfs_rename+0xbfc/0xf90 [ 43.098427][ T3500] do_renameat2+0xd74/0x1660 [ 43.103715][ T3500] __x64_sys_rename+0x82/0x90 [ 43.108904][ T3500] do_syscall_64+0x3d/0xb0 [ 43.113831][ T3500] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.120343][ T3500] [ 43.120343][ T3500] other info that might help us debug this: [ 43.120343][ T3500] [ 43.130553][ T3500] Possible unsafe locking scenario: [ 43.130553][ T3500] [ 43.137982][ T3500] CPU0 CPU1 [ 43.143325][ T3500] ---- ---- [ 43.148748][ T3500] lock(&tree->tree_lock); [ 43.153343][ T3500] lock(&HFSPLUS_I(inode)->extents_lock); [ 43.161654][ T3500] lock(&tree->tree_lock); [ 43.168653][ T3500] lock(&HFSPLUS_I(inode)->extents_lock); [ 43.174441][ T3500] [ 43.174441][ T3500] *** DEADLOCK *** [ 43.174441][ T3500] [ 43.182560][ T3500] 4 locks held by syz-executor139/3500: [ 43.188077][ T3500] #0: ffff888079ea4460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 [ 43.197186][ T3500] #1: ffff8880790e1e00 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: do_renameat2+0x611/0x1660 [ 43.207596][ T3500] #2: ffff88801e271740 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: lock_two_inodes+0xfc/0x180 [ 43.218185][ T3500] #3: ffff888079ac00b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 [ 43.228092][ T3500] [ 43.228092][ T3500] stack backtrace: [ 43.233955][ T3500] CPU: 0 PID: 3500 Comm: syz-executor139 Not tainted 5.15.145-syzkaller #0 [ 43.242512][ T3500] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 [ 43.252544][ T3500] Call Trace: [ 43.255820][ T3500] [ 43.258821][ T3500] dump_stack_lvl+0x1e3/0x2cb [ 43.263497][ T3500] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 43.269119][ T3500] ? print_circular_bug+0x12b/0x1a0 [ 43.274295][ T3500] check_noncircular+0x2f8/0x3b0 [ 43.279218][ T3500] ? add_chain_block+0x850/0x850 [ 43.284142][ T3500] ? lockdep_lock+0x11f/0x2a0 [ 43.288798][ T3500] ? stack_trace_save+0x1c0/0x1c0 [ 43.293812][ T3500] ? is_bpf_text_address+0x24f/0x260 [ 43.299095][ T3500] validate_chain+0x1649/0x5930 [ 43.303944][ T3500] ? arch_stack_walk+0xf3/0x140 [ 43.308771][ T3500] ? stack_trace_save+0x113/0x1c0 [ 43.313768][ T3500] ? reacquire_held_locks+0x660/0x660 [ 43.319117][ T3500] ? check_noncircular+0x1e1/0x3b0 [ 43.324206][ T3500] ? add_chain_block+0x850/0x850 [ 43.329119][ T3500] ? look_up_lock_class+0x77/0x120 [ 43.334225][ T3500] ? register_lock_class+0x100/0x9a0 [ 43.339488][ T3500] ? is_dynamic_key+0x1f0/0x1f0 [ 43.344316][ T3500] ? mark_lock+0x98/0x340 [ 43.348638][ T3500] __lock_acquire+0x1295/0x1ff0 [ 43.353494][ T3500] lock_acquire+0x1db/0x4f0 [ 43.358113][ T3500] ? hfsplus_file_extend+0x1d2/0x1b10 [ 43.363490][ T3500] ? read_lock_is_recursive+0x10/0x10 [ 43.368841][ T3500] ? __might_sleep+0xc0/0xc0 [ 43.373408][ T3500] ? print_irqtrace_events+0x210/0x210 [ 43.378864][ T3500] __mutex_lock_common+0x1da/0x25a0 [ 43.384041][ T3500] ? hfsplus_file_extend+0x1d2/0x1b10 [ 43.389393][ T3500] ? hfsplus_file_extend+0x1d2/0x1b10 [ 43.394753][ T3500] ? mutex_lock_io_nested+0x60/0x60 [ 43.399929][ T3500] ? read_lock_is_recursive+0x10/0x10 [ 43.405274][ T3500] mutex_lock_nested+0x17/0x20 [ 43.410030][ T3500] hfsplus_file_extend+0x1d2/0x1b10 [ 43.415208][ T3500] ? hfsplus_get_block+0x14e0/0x14e0 [ 43.420482][ T3500] ? __mutex_lock_common+0x444/0x25a0 [ 43.425830][ T3500] ? hfsplus_find_init+0x146/0x1c0 [ 43.430914][ T3500] ? mutex_lock_io_nested+0x60/0x60 [ 43.436090][ T3500] hfsplus_bmap_reserve+0x101/0x4e0 [ 43.441278][ T3500] hfsplus_rename_cat+0x1cf/0x1090 [ 43.446375][ T3500] ? mark_lock+0x98/0x340 [ 43.450788][ T3500] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 43.456767][ T3500] ? hfsplus_subfolders_dec+0x110/0x110 [ 43.462323][ T3500] ? read_lock_is_recursive+0x10/0x10 [ 43.467675][ T3500] ? down_write_nested+0x117/0x180 [ 43.472763][ T3500] ? down_read_non_owner+0x310/0x310 [ 43.478039][ T3500] ? generic_permission+0x21c/0x4f0 [ 43.483222][ T3500] ? do_raw_spin_unlock+0x137/0x8b0 [ 43.488433][ T3500] hfsplus_rename+0x12a/0x1b0 [ 43.493129][ T3500] ? hfsplus_mknod+0x2a0/0x2a0 [ 43.497902][ T3500] vfs_rename+0xbfc/0xf90 [ 43.502217][ T3500] ? __ia32_sys_link+0x90/0x90 [ 43.507070][ T3500] ? security_path_rename+0x207/0x2a0 [ 43.512422][ T3500] do_renameat2+0xd74/0x1660 [ 43.516994][ T3500] ? fsnotify_move+0x470/0x470 [ 43.522007][ T3500] ? 0xffffffff81000000 [ 43.526133][ T3500] ? __check_object_size+0x300/0x410 [ 43.531412][ T3500] ? getname_flags+0x1ec/0x4e0 [ 43.536152][ T3500] ? lockdep_hardirqs_on+0x94/0x130 [ 43.541328][ T3500] __x64_sys_rename+0x82/0x90 [ 43.545981][ T3500] do_syscall_64+0x3d/0xb0 [ 43.550373][ T3500] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.556243][ T3500] RIP: 0033:0x7fbce05c57b9 [ 43.560640][ T3500] 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 [ 43.580322][ T3500] RSP: 002b:00007fffa328ef68 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 [ 43.588725][ T3500] RAX: ffffffffffffffda RBX: 00007fffa328f148 RCX: 00007fbce05c57b9 [ 43.596690]