Warning: Permanently added '10.128.0.124' (ED25519) to the list of known hosts. executing program [ 51.438170][ T3500] loop0: detected capacity change from 0 to 1024 [ 51.480285][ T3500] [ 51.482652][ T3500] ====================================================== [ 51.489704][ T3500] WARNING: possible circular locking dependency detected [ 51.496727][ T3500] 5.15.120-syzkaller #0 Not tainted [ 51.501927][ T3500] ------------------------------------------------------ [ 51.508925][ T3500] syz-executor405/3500 is trying to acquire lock: [ 51.515319][ T3500] ffff88807e6ec0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x864/0xb80 [ 51.525161][ T3500] [ 51.525161][ T3500] but task is already holding lock: [ 51.532527][ T3500] ffff88807bd62988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2e1/0xb80 [ 51.543661][ T3500] [ 51.543661][ T3500] which lock already depends on the new lock. [ 51.543661][ T3500] [ 51.554058][ T3500] [ 51.554058][ T3500] the existing dependency chain (in reverse order) is: [ 51.563098][ T3500] [ 51.563098][ T3500] -> #1 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: [ 51.572123][ T3500] lock_acquire+0x1db/0x4f0 [ 51.577153][ T3500] __mutex_lock_common+0x1da/0x25a0 [ 51.582860][ T3500] mutex_lock_nested+0x17/0x20 [ 51.588131][ T3500] hfsplus_file_extend+0x1d2/0x1b10 [ 51.593837][ T3500] hfsplus_bmap_reserve+0x101/0x4e0 [ 51.599544][ T3500] hfsplus_rename_cat+0x1cf/0x1090 [ 51.605250][ T3500] hfsplus_unlink+0x304/0x7f0 [ 51.610436][ T3500] vfs_unlink+0x359/0x5f0 [ 51.615272][ T3500] do_unlinkat+0x49d/0x940 [ 51.620209][ T3500] __x64_sys_unlink+0x45/0x50 [ 51.625396][ T3500] do_syscall_64+0x3d/0xb0 [ 51.630338][ T3500] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.636826][ T3500] [ 51.636826][ T3500] -> #0 (&tree->tree_lock){+.+.}-{3:3}: [ 51.644629][ T3500] validate_chain+0x1646/0x58b0 [ 51.649989][ T3500] __lock_acquire+0x1295/0x1ff0 [ 51.655440][ T3500] lock_acquire+0x1db/0x4f0 [ 51.660455][ T3500] __mutex_lock_common+0x1da/0x25a0 [ 51.666164][ T3500] mutex_lock_nested+0x17/0x20 [ 51.671434][ T3500] hfsplus_file_truncate+0x864/0xb80 [ 51.677229][ T3500] hfsplus_setattr+0x1b9/0x280 [ 51.682679][ T3500] notify_change+0xd4d/0x1000 [ 51.687865][ T3500] do_truncate+0x21c/0x300 [ 51.692802][ T3500] path_openat+0x28a0/0x2f20 [ 51.697897][ T3500] do_filp_open+0x21c/0x460 [ 51.702912][ T3500] do_sys_openat2+0x13b/0x500 [ 51.708102][ T3500] __x64_sys_creat+0x11f/0x160 [ 51.713380][ T3500] do_syscall_64+0x3d/0xb0 [ 51.718305][ T3500] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.724705][ T3500] [ 51.724705][ T3500] other info that might help us debug this: [ 51.724705][ T3500] [ 51.734914][ T3500] Possible unsafe locking scenario: [ 51.734914][ T3500] [ 51.742343][ T3500] CPU0 CPU1 [ 51.747721][ T3500] ---- ---- [ 51.753084][ T3500] lock(&HFSPLUS_I(inode)->extents_lock); [ 51.758880][ T3500] lock(&tree->tree_lock); [ 51.765973][ T3500] lock(&HFSPLUS_I(inode)->extents_lock); [ 51.774282][ T3500] lock(&tree->tree_lock); [ 51.778771][ T3500] [ 51.778771][ T3500] *** DEADLOCK *** [ 51.778771][ T3500] [ 51.786896][ T3500] 3 locks held by syz-executor405/3500: [ 51.792423][ T3500] #0: ffff88807e6ea460 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 [ 51.801563][ T3500] #1: ffff88807bd62b80 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x208/0x300 [ 51.811907][ T3500] #2: ffff88807bd62988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2e1/0xb80 [ 51.823483][ T3500] [ 51.823483][ T3500] stack backtrace: [ 51.829353][ T3500] CPU: 0 PID: 3500 Comm: syz-executor405 Not tainted 5.15.120-syzkaller #0 [ 51.837923][ T3500] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 [ 51.847963][ T3500] Call Trace: [ 51.851230][ T3500] [ 51.854156][ T3500] dump_stack_lvl+0x1e3/0x2cb [ 51.858837][ T3500] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 51.864460][ T3500] ? print_circular_bug+0x12b/0x1a0 [ 51.869648][ T3500] check_noncircular+0x2f8/0x3b0 [ 51.874595][ T3500] ? add_chain_block+0x850/0x850 [ 51.879518][ T3500] ? lockdep_lock+0x11f/0x2a0 [ 51.884185][ T3500] ? add_chain_block+0x850/0x850 [ 51.889132][ T3500] validate_chain+0x1646/0x58b0 [ 51.893979][ T3500] ? reacquire_held_locks+0x660/0x660 [ 51.899341][ T3500] ? reacquire_held_locks+0x660/0x660 [ 51.904707][ T3500] ? look_up_lock_class+0x77/0x120 [ 51.909825][ T3500] ? register_lock_class+0x100/0x9a0 [ 51.915100][ T3500] ? mark_lock+0x98/0x340 [ 51.919418][ T3500] ? is_dynamic_key+0x1f0/0x1f0 [ 51.924253][ T3500] ? __lock_acquire+0x1295/0x1ff0 [ 51.929455][ T3500] ? mark_lock+0x98/0x340 [ 51.934036][ T3500] __lock_acquire+0x1295/0x1ff0 [ 51.938880][ T3500] lock_acquire+0x1db/0x4f0 [ 51.943373][ T3500] ? hfsplus_file_truncate+0x864/0xb80 [ 51.948824][ T3500] ? read_lock_is_recursive+0x10/0x10 [ 51.954204][ T3500] ? __might_sleep+0xc0/0xc0 [ 51.958786][ T3500] __mutex_lock_common+0x1da/0x25a0 [ 51.963975][ T3500] ? hfsplus_file_truncate+0x864/0xb80 [ 51.969427][ T3500] ? hfsplus_file_truncate+0x864/0xb80 [ 51.974890][ T3500] ? mutex_lock_io_nested+0x60/0x60 [ 51.980082][ T3500] ? hfsplus_free_extents+0x47e/0xae0 [ 51.985442][ T3500] mutex_lock_nested+0x17/0x20 [ 51.990196][ T3500] hfsplus_file_truncate+0x864/0xb80 [ 51.995474][ T3500] ? hfsplus_add_extent+0x880/0x880 [ 52.000749][ T3500] ? unmap_mapping_range+0x1ae/0x3e0 [ 52.006032][ T3500] ? unmap_mapping_pages+0x1e0/0x1e0 [ 52.011309][ T3500] ? truncate_setsize+0xcb/0xf0 [ 52.016147][ T3500] hfsplus_setattr+0x1b9/0x280 [ 52.020902][ T3500] ? hfsplus_write_failed+0x90/0x90 [ 52.026091][ T3500] notify_change+0xd4d/0x1000 [ 52.030758][ T3500] do_truncate+0x21c/0x300 [ 52.035167][ T3500] ? put_page_bootmem+0x280/0x280 [ 52.040193][ T3500] ? ima_bprm_check+0x2b0/0x2b0 [ 52.045143][ T3500] ? bpf_lsm_path_truncate+0x5/0x10 [ 52.050347][ T3500] path_openat+0x28a0/0x2f20 [ 52.054941][ T3500] ? do_filp_open+0x460/0x460 [ 52.059635][ T3500] do_filp_open+0x21c/0x460 [ 52.064131][ T3500] ? vfs_tmpfile+0x2e0/0x2e0 [ 52.068723][ T3500] ? _raw_spin_unlock+0x24/0x40 [ 52.073584][ T3500] ? alloc_fd+0x594/0x630 [ 52.077917][ T3500] do_sys_openat2+0x13b/0x500 [ 52.082591][ T3500] ? __context_tracking_enter+0x5f/0x90 [ 52.088130][ T3500] ? __context_tracking_exit+0x4c/0x80 [ 52.093577][ T3500] ? do_sys_open+0x220/0x220 [ 52.098157][ T3500] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 52.104146][ T3500] __x64_sys_creat+0x11f/0x160 [ 52.108898][ T3500] ? __x64_compat_sys_openat+0x290/0x290 [ 52.114520][ T3500] ? syscall_enter_from_user_mode+0x2e/0x230 [ 52.120494][ T3500] ? lockdep_hardirqs_on+0x94/0x130 [ 52.125682][ T3500] ? syscall_enter_from_user_mode+0x2e/0x230 [ 52.131655][ T3500] do_syscall_64+0x3d/0xb0 [ 52.136076][ T3500] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 52.141972][ T3500] RIP: 0033:0x7fe123f4a879 [ 52.146393][ 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 [ 52.165997][ T3500] RSP: 002b:00007ffc69e936c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 52.174509][ T3500] RAX: ffffffffffffffda RBX: 00007ffc69e938a8 RCX: 00007fe123f4a879 [ 52.1824