Warning: Permanently added '10.128.1.55' (ECDSA) to the list of known hosts. executing program [ 27.447853] hfsplus: xattr searching failed [ 27.452957] hfsplus: xattr searching failed [ 27.462409] [ 27.464035] ============================================ [ 27.469461] WARNING: possible recursive locking detected [ 27.474880] 4.14.302-syzkaller #0 Not tainted [ 27.479342] -------------------------------------------- [ 27.484757] syz-executor424/7989 is trying to acquire lock: [ 27.490436] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 27.500378] [ 27.500378] but task is already holding lock: [ 27.506314] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.516601] [ 27.516601] other info that might help us debug this: [ 27.523233] Possible unsafe locking scenario: [ 27.523233] [ 27.529256] CPU0 [ 27.531807] ---- [ 27.534357] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.539427] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.544497] [ 27.544497] *** DEADLOCK *** [ 27.544497] [ 27.550523] May be due to missing lock nesting notation [ 27.550523] [ 27.557417] 5 locks held by syz-executor424/7989: [ 27.562224] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 27.570607] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 27.580024] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.590751] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 27.600006] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 27.609163] [ 27.609163] stack backtrace: [ 27.613628] CPU: 0 PID: 7989 Comm: syz-executor424 Not tainted 4.14.302-syzkaller #0 [ 27.621474] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 27.631911] Call Trace: [ 27.634469] dump_stack+0x1b2/0x281 [ 27.638068] __lock_acquire.cold+0x180/0x97c [ 27.642450] ? register_lock_class+0x1d0/0x1180 [ 27.647091] ? trace_hardirqs_on+0x10/0x10 [ 27.651296] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 27.656626] ? save_trace+0xd6/0x290 [ 27.660308] ? __lock_acquire+0x2190/0x3f20 [ 27.664605] lock_acquire+0x170/0x3f0 [ 27.668377] ? hfsplus_get_block+0x1f9/0x820 [ 27.672757] ? hfsplus_get_block+0x1f9/0x820 [ 27.677139] __mutex_lock+0xc4/0x1310 [ 27.680912] ? hfsplus_get_block+0x1f9/0x820 [ 27.685293] ? hfsplus_get_block+0x1f9/0x820 [ 27.689676] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.695101] ? lock_acquire+0x170/0x3f0 [ 27.699049] ? create_page_buffers+0x14d/0x1c0 [ 27.703603] hfsplus_get_block+0x1f9/0x820 [ 27.707809] ? _raw_spin_unlock+0x29/0x40 [ 27.711926] ? create_page_buffers+0xce/0x1c0 [ 27.716388] block_read_full_page+0x25e/0x8d0 [ 27.720855] ? hfsplus_file_extend+0xef0/0xef0 [ 27.725408] ? __lru_cache_add+0x178/0x250 [ 27.729612] ? __bread_gfp+0x2e0/0x2e0 [ 27.733469] ? add_to_page_cache_lru+0x136/0x2b0 [ 27.738192] ? add_to_page_cache_locked+0x40/0x40 [ 27.743004] ? alloc_pages_current+0x15d/0x260 [ 27.747556] do_read_cache_page+0x38e/0xc10 [ 27.751845] ? hfsplus_bmap+0x30/0x30 [ 27.755626] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.761049] hfsplus_block_free+0x177/0x560 [ 27.765341] hfsplus_free_extents+0x170/0x440 [ 27.769806] hfsplus_file_truncate+0xbc0/0xe80 [ 27.774360] ? hfsplus_get_block+0x820/0x820 [ 27.778737] ? up_write+0x17/0x60 [ 27.782158] ? unmap_mapping_range+0xe9/0x250 [ 27.786623] ? inode_newsize_ok+0x145/0x1c0 [ 27.790913] hfsplus_setattr+0x182/0x310 [ 27.794942] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 27.799407] notify_change+0x56b/0xd10 [ 27.803265] do_truncate+0xff/0x1a0 [ 27.806860] ? finish_open+0x170/0x170 [ 27.810720] ? apparmor_path_truncate+0x163/0x1d0 [ 27.815532] path_openat+0x1dcc/0x2970 [ 27.819391] ? path_lookupat+0x780/0x780 [ 27.823426] ? trace_hardirqs_on+0x10/0x10 [ 27.827630] ? trace_hardirqs_on+0x10/0x10 [ 27.831833] do_filp_open+0x179/0x3c0 [ 27.835604] ? may_open_dev+0xe0/0xe0 [ 27.839375] ? lock_downgrade+0x740/0x740 [ 27.843492] ? do_raw_spin_unlock+0x164/0x220 [ 27.847956] ? _raw_spin_unlock+0x29/0x40 [ 27.852073] ? __alloc_fd+0x1be/0x490 [ 27.855846] do_sys_open+0x296/0x410 [ 27.859533] ? filp_open+0x60/0x60 [ 27.863044] ? do_syscall_64+0x4c/0x640 [ 27.866988] ? SyS_open+0x30/0x30 [ 27.870410] do_syscall_64+0x1d5/0x640 [ 27.874267] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.879426] RIP: 0033:0x7febc7e5a799 [ 27.883113] RSP: 002b:00007ffca06fd668 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 27.890793] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007febc7e5a799 [ 27.898032] RDX: 0000000000123b46 RSI: 0000000020000280 RDI: 00000000ffffff9c [ 27.905274] RBP: 00007febc7e1a030 R08: 0000000000000000 R09: 0000000000000000 [ 27.912512] R10: 0000000000000000 R11: 0000000000000246 R12: 00007febc7e1a0c0 [ 27.919752] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000