Warning: Permanently added '10.128.0.34' (ECDSA) to the list of known hosts. executing program [ 43.494785][ T3497] loop0: detected capacity change from 0 to 1024 [ 43.518862][ T3497] [ 43.521216][ T3497] ============================================ [ 43.527357][ T3497] WARNING: possible recursive locking detected [ 43.533502][ T3497] 5.15.118-syzkaller #0 Not tainted [ 43.538674][ T3497] -------------------------------------------- [ 43.544795][ T3497] syz-executor332/3497 is trying to acquire lock: [ 43.551182][ T3497] ffff8880161ea0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 [ 43.560822][ T3497] [ 43.560822][ T3497] but task is already holding lock: [ 43.568166][ T3497] ffff8880161ea0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 [ 43.577784][ T3497] [ 43.577784][ T3497] other info that might help us debug this: [ 43.585825][ T3497] Possible unsafe locking scenario: [ 43.585825][ T3497] [ 43.593253][ T3497] CPU0 [ 43.596504][ T3497] ---- [ 43.599759][ T3497] lock(&tree->tree_lock/1); [ 43.604413][ T3497] lock(&tree->tree_lock/1); [ 43.609065][ T3497] [ 43.609065][ T3497] *** DEADLOCK *** [ 43.609065][ T3497] [ 43.617180][ T3497] May be due to missing lock nesting notation [ 43.617180][ T3497] [ 43.625467][ T3497] 5 locks held by syz-executor332/3497: [ 43.630980][ T3497] #0: ffff8880161ec460 (sb_writers#9){.+.+}-{0:0}, at: vfs_write+0x29a/0xe50 [ 43.639824][ T3497] #1: ffff888078638300 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: generic_file_write_iter+0x7c/0x1b0 [ 43.651097][ T3497] #2: ffff888078638108 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d2/0x1b10 [ 43.661414][ T3497] #3: ffff8880161ea0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 [ 43.671470][ T3497] #4: ffff888076ac0108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d2/0x1b10 [ 43.682909][ T3497] [ 43.682909][ T3497] stack backtrace: [ 43.688769][ T3497] CPU: 1 PID: 3497 Comm: syz-executor332 Not tainted 5.15.118-syzkaller #0 [ 43.697334][ T3497] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 43.707366][ T3497] Call Trace: [ 43.710625][ T3497] [ 43.713547][ T3497] dump_stack_lvl+0x1e3/0x2cb [ 43.718201][ T3497] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 43.723806][ T3497] ? panic+0x84d/0x84d [ 43.727849][ T3497] validate_chain+0x46cf/0x58b0 [ 43.732678][ T3497] ? reacquire_held_locks+0x660/0x660 [ 43.738026][ T3497] ? mark_lock+0x98/0x340 [ 43.742329][ T3497] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 43.748283][ T3497] ? print_irqtrace_events+0x210/0x210 [ 43.753718][ T3497] ? mark_lock+0x98/0x340 [ 43.758018][ T3497] __lock_acquire+0x1295/0x1ff0 [ 43.762841][ T3497] lock_acquire+0x1db/0x4f0 [ 43.767316][ T3497] ? hfsplus_find_init+0x146/0x1c0 [ 43.772402][ T3497] ? read_lock_is_recursive+0x10/0x10 [ 43.777748][ T3497] ? __kmalloc+0x168/0x300 [ 43.782140][ T3497] ? hfsplus_file_extend+0x40a/0x1b10 [ 43.787487][ T3497] ? __might_sleep+0xc0/0xc0 [ 43.792047][ T3497] ? __block_write_begin_int+0x60b/0x1650 [ 43.797737][ T3497] ? cont_write_begin+0x5d6/0x840 [ 43.802742][ T3497] ? hfsplus_write_begin+0x92/0xd0 [ 43.807841][ T3497] ? generic_perform_write+0x2bf/0x5b0 [ 43.813285][ T3497] ? __generic_file_write_iter+0x243/0x4f0 [ 43.819068][ T3497] ? generic_file_write_iter+0xa7/0x1b0 [ 43.824583][ T3497] ? vfs_write+0xacf/0xe50 [ 43.828975][ T3497] ? ksys_write+0x1a2/0x2c0 [ 43.833447][ T3497] ? do_syscall_64+0x3d/0xb0 [ 43.838010][ T3497] __mutex_lock_common+0x1da/0x25a0 [ 43.843183][ T3497] ? hfsplus_find_init+0x146/0x1c0 [ 43.848269][ T3497] ? hfsplus_find_init+0x146/0x1c0 [ 43.853358][ T3497] ? mutex_lock_io_nested+0x60/0x60 [ 43.858542][ T3497] ? hfsplus_find_init+0x81/0x1c0 [ 43.863538][ T3497] mutex_lock_nested+0x17/0x20 [ 43.868387][ T3497] hfsplus_find_init+0x146/0x1c0 [ 43.873323][ T3497] hfsplus_file_extend+0x40a/0x1b10 [ 43.878502][ T3497] ? hfsplus_get_block+0x14e0/0x14e0 [ 43.883762][ T3497] ? __mutex_trylock_common+0x17e/0x2e0 [ 43.889283][ T3497] ? __might_sleep+0xc0/0xc0 [ 43.893848][ T3497] ? rcu_lock_release+0x20/0x20 [ 43.898674][ T3497] ? hfsplus_brec_find+0x199/0x570 [ 43.903760][ T3497] hfsplus_bmap_reserve+0x101/0x4e0 [ 43.908938][ T3497] __hfsplus_ext_write_extent+0x2a4/0x5b0 [ 43.914630][ T3497] __hfsplus_ext_cache_extent+0x84/0xe00 [ 43.920236][ T3497] ? mutex_lock_nested+0x17/0x20 [ 43.925151][ T3497] hfsplus_file_extend+0x435/0x1b10 [ 43.930326][ T3497] ? hfsplus_get_block+0x14e0/0x14e0 [ 43.935586][ T3497] ? find_lock_entries+0x1030/0x1030 [ 43.940849][ T3497] ? __lock_acquire+0x1ff0/0x1ff0 [ 43.945846][ T3497] ? pagevec_lookup_range+0x2e/0x70 [ 43.951017][ T3497] ? clean_bdev_aliases+0x801/0x940 [ 43.956190][ T3497] hfsplus_get_block+0x402/0x14e0 [ 43.961191][ T3497] ? hfsplus_ext_write_extent+0x1f0/0x1f0 [ 43.966889][ T3497] ? create_page_buffers+0x24b/0x330 [ 43.972146][ T3497] __block_write_begin_int+0x60b/0x1650 [ 43.977669][ T3497] ? hfsplus_ext_write_extent+0x1f0/0x1f0 [ 43.983361][ T3497] ? page_zero_new_buffers+0x510/0x510 [ 43.988794][ T3497] ? exc_page_fault+0x342/0x740 [ 43.993630][ T3497] ? wait_for_stable_page+0xe2/0x110 [ 43.998912][ T3497] cont_write_begin+0x5d6/0x840 [ 44.003752][ T3497] ? generic_cont_expand_simple+0x230/0x230 [ 44.009624][ T3497] ? fault_in_readable+0x1d5/0x2e0 [ 44.014721][ T3497] ? fault_in_safe_writeable+0x250/0x250 [ 44.020329][ T3497] hfsplus_write_begin+0x92/0xd0 [ 44.025241][ T3497] ? hfsplus_ext_write_extent+0x1f0/0x1f0 [ 44.030932][ T3497] generic_perform_write+0x2bf/0x5b0 [ 44.036194][ T3497] ? grab_cache_page_write_begin+0x90/0x90 [ 44.041971][ T3497] ? file_remove_privs+0x610/0x610 [ 44.047058][ T3497] ? down_write+0x10e/0x170 [ 44.051536][ T3497] __generic_file_write_iter+0x243/0x4f0 [ 44.057149][ T3497] generic_file_write_iter+0xa7/0x1b0 [ 44.062498][ T3497] vfs_write+0xacf/0xe50 [ 44.066718][ T3497] ? file_end_write+0x250/0x250 [ 44.071544][ T3497] ? __context_tracking_enter+0x5f/0x90 [ 44.077067][ T3497] ? __fdget_pos+0x272/0x300 [ 44.081631][ T3497] ksys_write+0x1a2/0x2c0 [ 44.085935][ T3497] ? print_irqtrace_events+0x210/0x210 [ 44.091367][ T3497] ? __ia32_sys_read+0x80/0x80 [ 44.096105][ T3497] ? syscall_enter_from_user_mode+0x2e/0x230 [ 44.102060][ T3497] ? lockdep_hardirqs_on+0x94/0x130 [ 44.107234][ T3497] ? syscall_enter_from_user_mode+0x2e/0x230 [ 44.113190][ T3497] do_syscall_64+0x3d/0xb0 [ 44.117583][ T3497] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 44.123455][ T3497] RIP: 0033:0x7f2af95337e9 [ 44.127848][ T3497] 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 [ 44.147429][ T3497] RSP: 002b:00007ffc58a8f888 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 44.155815][ T3497] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2af95337e9 [ 44.163761][ T3497] RDX: 00000000fffffff0 RSI: 0000000020004200 RDI: 0000000000000004 [ 44.171706][ T3497] RBP: 00007f2af94f3080 R08: 0000000000000000 R09: 0000000000000000 [ 44.179655][ T3497] R10: 0000000000000647 R11: 0000000000000246 R12: 00007f2af94f3110 [ 44.187600][ T3497] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 44.195548][ T3497]