Warning: Permanently added '10.128.0.254' (ED25519) to the list of known hosts. executing program [ 46.092763][ T3498] loop0: detected capacity change from 0 to 64 [ 46.163933][ T3498] [ 46.166283][ T3498] ============================================ [ 46.172408][ T3498] WARNING: possible recursive locking detected [ 46.178530][ T3498] 5.15.120-syzkaller #0 Not tainted [ 46.183712][ T3498] -------------------------------------------- [ 46.189831][ T3498] syz-executor416/3498 is trying to acquire lock: [ 46.196214][ T3498] ffff888079e9e0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0 [ 46.205529][ T3498] [ 46.205529][ T3498] but task is already holding lock: [ 46.212883][ T3498] ffff888079e9e0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0 [ 46.222165][ T3498] [ 46.222165][ T3498] other info that might help us debug this: [ 46.230204][ T3498] Possible unsafe locking scenario: [ 46.230204][ T3498] [ 46.237644][ T3498] CPU0 [ 46.240909][ T3498] ---- [ 46.244269][ T3498] lock(&tree->tree_lock/1); [ 46.248934][ T3498] lock(&tree->tree_lock/1); [ 46.253591][ T3498] [ 46.253591][ T3498] *** DEADLOCK *** [ 46.253591][ T3498] [ 46.262059][ T3498] May be due to missing lock nesting notation [ 46.262059][ T3498] [ 46.270351][ T3498] 5 locks held by syz-executor416/3498: [ 46.275865][ T3498] #0: ffff888079e9c460 (sb_writers#9){.+.+}-{0:0}, at: vfs_write+0x29a/0xe50 [ 46.284728][ T3498] #1: ffff888078da9628 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: generic_file_write_iter+0x7c/0x1b0 [ 46.296013][ T3498] #2: ffff888078da9478 (&HFS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xfb/0x1440 [ 46.307128][ T3498] #3: ffff888079e9e0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0 [ 46.317014][ T3498] #4: ffff888078da80f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xfb/0x1440 [ 46.328378][ T3498] [ 46.328378][ T3498] stack backtrace: [ 46.334499][ T3498] CPU: 1 PID: 3498 Comm: syz-executor416 Not tainted 5.15.120-syzkaller #0 [ 46.343245][ T3498] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 [ 46.353304][ T3498] Call Trace: [ 46.356572][ T3498] [ 46.359480][ T3498] dump_stack_lvl+0x1e3/0x2cb [ 46.364155][ T3498] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 46.369866][ T3498] ? panic+0x84d/0x84d [ 46.373936][ T3498] validate_chain+0x46cf/0x58b0 [ 46.378774][ T3498] ? __lock_acquire+0x1295/0x1ff0 [ 46.383795][ T3498] ? reacquire_held_locks+0x660/0x660 [ 46.389163][ T3498] ? mark_lock+0x98/0x340 [ 46.393513][ T3498] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 46.399479][ T3498] ? mark_lock+0x98/0x340 [ 46.403791][ T3498] __lock_acquire+0x1295/0x1ff0 [ 46.408622][ T3498] lock_acquire+0x1db/0x4f0 [ 46.413103][ T3498] ? hfs_find_init+0x16a/0x1e0 [ 46.417843][ T3498] ? read_lock_is_recursive+0x10/0x10 [ 46.423202][ T3498] ? ____kasan_kmalloc+0xd1/0xf0 [ 46.428118][ T3498] ? __might_sleep+0xc0/0xc0 [ 46.432682][ T3498] ? __hfs_ext_write_extent+0x22e/0x4f0 [ 46.438211][ T3498] ? __hfs_ext_cache_extent+0x6a/0x990 [ 46.443640][ T3498] ? hfs_extend_file+0x340/0x1440 [ 46.448638][ T3498] ? hfs_get_block+0x3e0/0xb60 [ 46.453374][ T3498] ? __block_write_begin_int+0x60b/0x1650 [ 46.459067][ T3498] ? cont_write_begin+0x5d6/0x840 [ 46.464073][ T3498] ? hfs_write_begin+0x92/0xd0 [ 46.468821][ T3498] ? generic_perform_write+0x2bf/0x5b0 [ 46.474280][ T3498] ? __generic_file_write_iter+0x243/0x4f0 [ 46.480169][ T3498] ? vfs_write+0xacf/0xe50 [ 46.484593][ T3498] ? ksys_write+0x1a2/0x2c0 [ 46.489081][ T3498] ? do_syscall_64+0x3d/0xb0 [ 46.493653][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 46.498833][ T3498] ? hfs_find_init+0x16a/0x1e0 [ 46.503576][ T3498] ? hfs_find_init+0x16a/0x1e0 [ 46.508313][ T3498] ? mutex_lock_io_nested+0x60/0x60 [ 46.513489][ T3498] ? __kmalloc+0x168/0x300 [ 46.517877][ T3498] ? hfs_find_init+0x8c/0x1e0 [ 46.522540][ T3498] mutex_lock_nested+0x17/0x20 [ 46.527299][ T3498] hfs_find_init+0x16a/0x1e0 [ 46.531884][ T3498] hfs_extend_file+0x317/0x1440 [ 46.536799][ T3498] ? hfs_get_block+0xb60/0xb60 [ 46.541547][ T3498] ? __mutex_lock_common+0x444/0x25a0 [ 46.546913][ T3498] ? hfs_brec_find+0x193/0x570 [ 46.551754][ T3498] hfs_bmap_reserve+0xd5/0x3f0 [ 46.556495][ T3498] __hfs_ext_write_extent+0x22e/0x4f0 [ 46.561841][ T3498] __hfs_ext_cache_extent+0x6a/0x990 [ 46.567102][ T3498] ? mutex_lock_nested+0x17/0x20 [ 46.572036][ T3498] ? hfs_find_init+0x16a/0x1e0 [ 46.576775][ T3498] hfs_extend_file+0x340/0x1440 [ 46.581603][ T3498] ? hfs_get_block+0xb60/0xb60 [ 46.586359][ T3498] ? find_lock_entries+0x1030/0x1030 [ 46.591620][ T3498] ? __lock_acquire+0x1ff0/0x1ff0 [ 46.596622][ T3498] ? pagevec_lookup_range+0x2e/0x70 [ 46.602233][ T3498] ? clean_bdev_aliases+0x801/0x940 [ 46.607499][ T3498] hfs_get_block+0x3e0/0xb60 [ 46.612155][ T3498] ? hfs_free_extents+0x420/0x420 [ 46.617154][ T3498] ? create_page_buffers+0x24b/0x330 [ 46.622411][ T3498] __block_write_begin_int+0x60b/0x1650 [ 46.627946][ T3498] ? hfs_free_extents+0x420/0x420 [ 46.632949][ T3498] ? page_zero_new_buffers+0x510/0x510 [ 46.638395][ T3498] ? exc_page_fault+0x342/0x740 [ 46.643235][ T3498] ? wait_for_stable_page+0xe2/0x110 [ 46.648517][ T3498] cont_write_begin+0x5d6/0x840 [ 46.653364][ T3498] ? generic_cont_expand_simple+0x230/0x230 [ 46.659246][ T3498] ? fault_in_readable+0x1d5/0x2e0 [ 46.664348][ T3498] ? fault_in_safe_writeable+0x250/0x250 [ 46.669979][ T3498] hfs_write_begin+0x92/0xd0 [ 46.674570][ T3498] ? hfs_free_extents+0x420/0x420 [ 46.679574][ T3498] generic_perform_write+0x2bf/0x5b0 [ 46.684852][ T3498] ? grab_cache_page_write_begin+0x90/0x90 [ 46.690655][ T3498] ? file_remove_privs+0x610/0x610 [ 46.695777][ T3498] ? down_write+0x10e/0x170 [ 46.700262][ T3498] __generic_file_write_iter+0x243/0x4f0 [ 46.705888][ T3498] generic_file_write_iter+0xa7/0x1b0 [ 46.711264][ T3498] vfs_write+0xacf/0xe50 [ 46.715511][ T3498] ? file_end_write+0x250/0x250 [ 46.720339][ T3498] ? read_lock_is_recursive+0x10/0x10 [ 46.725807][ T3498] ? __fdget_pos+0x272/0x300 [ 46.730386][ T3498] ksys_write+0x1a2/0x2c0 [ 46.734783][ T3498] ? print_irqtrace_events+0x210/0x210 [ 46.740225][ T3498] ? __ia32_sys_read+0x80/0x80 [ 46.744965][ T3498] ? syscall_enter_from_user_mode+0x2e/0x230 [ 46.750930][ T3498] ? lockdep_hardirqs_on+0x94/0x130 [ 46.756128][ T3498] ? syscall_enter_from_user_mode+0x2e/0x230 [ 46.762097][ T3498] do_syscall_64+0x3d/0xb0 [ 46.766499][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 46.772467][ T3498] RIP: 0033:0x7f3c9d5a2639 [ 46.776896][ T3498] 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 [ 46.796578][ T3498] RSP: 002b:00007ffd72f6e518 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 46.805064][ T3498] RAX: ffffffffffffffda RBX: 00007ffd72f6e6e8 RCX: 00007f3c9d5a2639 [ 46.813035][ T3498] RDX: 000000000208e24b RSI: 0000000020000180 RDI: 0000000000000004 [ 46.820987][ T3498] RBP: 00007f3c9d615610 R08: 0000000000000000 R09: 00007ffd72f6e6e8 [ 46.828933][ T3498] R10: 00000000000002ba R11: 0000000000000246 R12: 0000000000000001 [ 46.836892][ T3498] R13: 00007ffd72f6e6d8 R14: 0000000000000001 R15: 0000000000000001 [ 46.844857][ T3498] [ 51.151056][ T1144] attempt to access beyond end of device [ 51.151056][ T1144] loop0: rw=1048577, want=96, limit=64 [ 51.162306][ T1144] Buffer I/O error on dev loop0, logical block 95, lost async page write [ 51.171000][ T1144] attempt to access beyond end of device [ 51.171000][ T1144] loop0: rw=1048577, want=97, limit=64 [ 51.182034][ T1144] Buffer I/O error on dev loop0, logical block 96, lost async page write [ 51.190961][ T1144] attempt to access beyond end of device [ 51.190961][ T1144] loop0: rw=1048577, want=99, limit=64 [ 51.201974][ T1144] Buffer I/O error on dev loop0, logical block 98, lost async page write [ 51.210530][ T1144] attempt to access beyond end of device [ 51.210530][ T1144] loop0: rw=1048577, want=101, limit=64 [ 51.221759][ T1144] Buffer I/O error on dev loop0, logical block 100, lost async page write [ 51.230282][ T1144] attempt to access beyond end of device [ 51.230282][ T1144] loop0: rw=1048577, want=102, limit=64 [ 51.241380][ T1144] Buffer I/O error on dev loop0, logical block 101, lost async page write [ 51.249939][ T1144] attempt to access beyond end of device [ 51.249939][ T1144] loop0: rw=1048577, want=103, limit=64 [ 51.261104][ T1144] Buffer I/O error on dev loop0, logical block 102, lost async page write [ 51.269624][ T1144] attempt to access beyond end of device [ 51.269624][ T1144] loop0: rw=1048577, want=104, limit=64 [ 51.280678][ T1144] Buffer I/O error on dev loop0, logical block 103, lost async page write [ 51.289254][ T1144] attempt to access beyond end of device [ 51.289254][ T1144] loop0: rw=1048577, want=105, limit=64 [ 51.300280][ T1144] Buffer I/O error on dev loop0, logical block 104, lost async page write [ 51.310494][ T1144] attempt to access beyond end of device [ 51.310494][ T1144] loop0: rw=1048577, want=3433, limit=64 [ 51.323066][ T1144] attempt to access beyond end of device [ 51.323066][ T1144] loop0: rw=1, want=4169, limit=64