Warning: Permanently added '10.128.0.102' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 52.630934][ T3498] loop0: detected capacity change from 0 to 1024 [ 52.671670][ T3498] [ 52.674306][ T3498] ====================================================== [ 52.681335][ T3498] WARNING: possible circular locking dependency detected [ 52.688360][ T3498] 5.15.118-syzkaller #0 Not tainted [ 52.693545][ T3498] ------------------------------------------------------ [ 52.700674][ T3498] syz-executor137/3498 is trying to acquire lock: [ 52.707177][ T3498] ffff8880791b60b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x864/0xb80 [ 52.717023][ T3498] [ 52.717023][ T3498] but task is already holding lock: [ 52.724386][ T3498] ffff8880793f3048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2e1/0xb80 [ 52.735516][ T3498] [ 52.735516][ T3498] which lock already depends on the new lock. [ 52.735516][ T3498] [ 52.746082][ T3498] [ 52.746082][ T3498] the existing dependency chain (in reverse order) is: [ 52.755089][ T3498] [ 52.755089][ T3498] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 52.764204][ T3498] lock_acquire+0x1db/0x4f0 [ 52.769225][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 52.774936][ T3498] mutex_lock_nested+0x17/0x20 [ 52.780212][ T3498] hfsplus_file_extend+0x1d2/0x1b10 [ 52.785926][ T3498] hfsplus_bmap_reserve+0x101/0x4e0 [ 52.791634][ T3498] hfsplus_rename_cat+0x1cf/0x1090 [ 52.797253][ T3498] hfsplus_unlink+0x304/0x7f0 [ 52.802439][ T3498] vfs_unlink+0x359/0x5f0 [ 52.807280][ T3498] do_unlinkat+0x49d/0x940 [ 52.812212][ T3498] __x64_sys_unlink+0x45/0x50 [ 52.817400][ T3498] do_syscall_64+0x3d/0xb0 [ 52.822334][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 52.828734][ T3498] [ 52.828734][ T3498] -> #0 (&tree->tree_lock){+.+.}-{3:3}: [ 52.836530][ T3498] validate_chain+0x1646/0x58b0 [ 52.841919][ T3498] __lock_acquire+0x1295/0x1ff0 [ 52.847283][ T3498] lock_acquire+0x1db/0x4f0 [ 52.852314][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 52.858026][ T3498] mutex_lock_nested+0x17/0x20 [ 52.863299][ T3498] hfsplus_file_truncate+0x864/0xb80 [ 52.869100][ T3498] hfsplus_setattr+0x1b9/0x280 [ 52.874373][ T3498] notify_change+0xd4d/0x1000 [ 52.879559][ T3498] do_truncate+0x21c/0x300 [ 52.884486][ T3498] path_openat+0x28a0/0x2f20 [ 52.889587][ T3498] do_filp_open+0x21c/0x460 [ 52.894606][ T3498] do_sys_openat2+0x13b/0x500 [ 52.899804][ T3498] __x64_sys_creat+0x11f/0x160 [ 52.905080][ T3498] do_syscall_64+0x3d/0xb0 [ 52.910012][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 52.916418][ T3498] [ 52.916418][ T3498] other info that might help us debug this: [ 52.916418][ T3498] [ 52.926632][ T3498] Possible unsafe locking scenario: [ 52.926632][ T3498] [ 52.934071][ T3498] CPU0 CPU1 [ 52.939422][ T3498] ---- ---- [ 52.944771][ T3498] lock(&HFSPLUS_I(inode)->extents_lock); [ 52.950657][ T3498] lock(&tree->tree_lock); [ 52.957753][ T3498] lock(&HFSPLUS_I(inode)->extents_lock); [ 52.966067][ T3498] lock(&tree->tree_lock); [ 52.970565][ T3498] [ 52.970565][ T3498] *** DEADLOCK *** [ 52.970565][ T3498] [ 52.978694][ T3498] 3 locks held by syz-executor137/3498: [ 52.984221][ T3498] #0: ffff888078c46460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 [ 52.993363][ T3498] #1: ffff8880793f3240 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x208/0x300 [ 53.003717][ T3498] #2: ffff8880793f3048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2e1/0xb80 [ 53.015285][ T3498] [ 53.015285][ T3498] stack backtrace: [ 53.021158][ T3498] CPU: 1 PID: 3498 Comm: syz-executor137 Not tainted 5.15.118-syzkaller #0 [ 53.029757][ T3498] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 53.039801][ T3498] Call Trace: [ 53.043081][ T3498] [ 53.046002][ T3498] dump_stack_lvl+0x1e3/0x2cb [ 53.050673][ T3498] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 53.056301][ T3498] ? print_circular_bug+0x12b/0x1a0 [ 53.061488][ T3498] check_noncircular+0x2f8/0x3b0 [ 53.066417][ T3498] ? add_chain_block+0x850/0x850 [ 53.071343][ T3498] ? lockdep_lock+0x11f/0x2a0 [ 53.076015][ T3498] ? add_chain_block+0x850/0x850 [ 53.080945][ T3498] validate_chain+0x1646/0x58b0 [ 53.085793][ T3498] ? reacquire_held_locks+0x660/0x660 [ 53.091159][ T3498] ? reacquire_held_locks+0x660/0x660 [ 53.096607][ T3498] ? look_up_lock_class+0x77/0x120 [ 53.101711][ T3498] ? register_lock_class+0x100/0x9a0 [ 53.106988][ T3498] ? mark_lock+0x98/0x340 [ 53.111308][ T3498] ? is_dynamic_key+0x1f0/0x1f0 [ 53.116148][ T3498] ? __lock_acquire+0x1295/0x1ff0 [ 53.121164][ T3498] ? mark_lock+0x98/0x340 [ 53.125482][ T3498] __lock_acquire+0x1295/0x1ff0 [ 53.130329][ T3498] lock_acquire+0x1db/0x4f0 [ 53.134830][ T3498] ? hfsplus_file_truncate+0x864/0xb80 [ 53.140282][ T3498] ? read_lock_is_recursive+0x10/0x10 [ 53.145653][ T3498] ? __might_sleep+0xc0/0xc0 [ 53.150236][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 53.155425][ T3498] ? hfsplus_file_truncate+0x864/0xb80 [ 53.160880][ T3498] ? hfsplus_file_truncate+0x864/0xb80 [ 53.166333][ T3498] ? mutex_lock_io_nested+0x60/0x60 [ 53.171525][ T3498] ? hfsplus_free_extents+0x47e/0xae0 [ 53.176889][ T3498] mutex_lock_nested+0x17/0x20 [ 53.181649][ T3498] hfsplus_file_truncate+0x864/0xb80 [ 53.186928][ T3498] ? hfsplus_add_extent+0x880/0x880 [ 53.192117][ T3498] ? unmap_mapping_range+0x1ae/0x3e0 [ 53.197392][ T3498] ? unmap_mapping_pages+0x1e0/0x1e0 [ 53.202670][ T3498] ? truncate_setsize+0xcb/0xf0 [ 53.207598][ T3498] hfsplus_setattr+0x1b9/0x280 [ 53.212353][ T3498] ? hfsplus_write_failed+0x90/0x90 [ 53.217543][ T3498] notify_change+0xd4d/0x1000 [ 53.222211][ T3498] do_truncate+0x21c/0x300 [ 53.226618][ T3498] ? put_page_bootmem+0x280/0x280 [ 53.231632][ T3498] ? ima_bprm_check+0x2b0/0x2b0 [ 53.236475][ T3498] ? bpf_lsm_path_truncate+0x5/0x10 [ 53.241668][ T3498] path_openat+0x28a0/0x2f20 [ 53.246263][ T3498] ? do_filp_open+0x460/0x460 [ 53.250936][ T3498] do_filp_open+0x21c/0x460 [ 53.255431][ T3498] ? vfs_tmpfile+0x2e0/0x2e0 [ 53.260026][ T3498] ? _raw_spin_unlock+0x24/0x40 [ 53.264881][ T3498] ? alloc_fd+0x594/0x630 [ 53.269227][ T3498] do_sys_openat2+0x13b/0x500 [ 53.273889][ T3498] ? read_lock_is_recursive+0x10/0x10 [ 53.279356][ T3498] ? __context_tracking_exit+0x4c/0x80 [ 53.284822][ T3498] ? do_sys_open+0x220/0x220 [ 53.289401][ T3498] ? do_unlinkat+0x87f/0x940 [ 53.293989][ T3498] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 53.299991][ T3498] __x64_sys_creat+0x11f/0x160 [ 53.304745][ T3498] ? __x64_compat_sys_openat+0x290/0x290 [ 53.310372][ T3498] ? syscall_enter_from_user_mode+0x2e/0x230 [ 53.316607][ T3498] ? lockdep_hardirqs_on+0x94/0x130 [ 53.321798][ T3498] ? syscall_enter_from_user_mode+0x2e/0x230 [ 53.327771][ T3498] do_syscall_64+0x3d/0xb0 [ 53.332181][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 53.338064][ T3498] RIP: 0033:0x7f46a0580879 [ 53.342490][ T3498] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 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 c0 ff ff ff f7 d8 64 89 01 48 [ 53.362083][ T3498] RSP: 002b:00007fffd1295e28 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 53.370486][ T3498] RAX: ffffffffffffffda RBX: 0