Warning: Permanently added '10.128.0.216' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.235966] hfsplus: xattr searching failed [ 32.240910] [ 32.242537] ============================================ [ 32.247974] WARNING: possible recursive locking detected [ 32.253411] 4.19.211-syzkaller #0 Not tainted [ 32.257896] -------------------------------------------- [ 32.263332] syz-executor382/8078 is trying to acquire lock: [ 32.269022] 0000000048578374 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 32.278543] [ 32.278543] but task is already holding lock: [ 32.284488] 00000000df9686d3 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.294956] [ 32.294956] other info that might help us debug this: [ 32.301594] Possible unsafe locking scenario: [ 32.301594] [ 32.307621] CPU0 [ 32.310173] ---- [ 32.312737] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.317810] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.322972] [ 32.322972] *** DEADLOCK *** [ 32.322972] [ 32.329003] May be due to missing lock nesting notation [ 32.329003] [ 32.335904] 4 locks held by syz-executor382/8078: [ 32.340718] #0: 00000000c5896be9 (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 32.349365] #1: 0000000030581862 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 32.358446] #2: 00000000df9686d3 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.368827] #3: 000000001a35693e (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 32.377555] [ 32.377555] stack backtrace: [ 32.382028] CPU: 1 PID: 8078 Comm: syz-executor382 Not tainted 4.19.211-syzkaller #0 [ 32.389979] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.399308] Call Trace: [ 32.401873] dump_stack+0x1fc/0x2ef [ 32.405488] __lock_acquire.cold+0x121/0x57e [ 32.409874] ? mark_held_locks+0xf0/0xf0 [ 32.413909] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.419245] ? save_trace+0xd6/0x290 [ 32.422933] ? __lock_acquire+0x22f9/0x3ff0 [ 32.427230] lock_acquire+0x170/0x3c0 [ 32.431006] ? hfsplus_get_block+0x292/0x960 [ 32.435390] ? hfsplus_get_block+0x292/0x960 [ 32.439773] __mutex_lock+0xd7/0x1190 [ 32.443550] ? hfsplus_get_block+0x292/0x960 [ 32.447937] ? check_preemption_disabled+0x41/0x280 [ 32.452931] ? hfsplus_get_block+0x292/0x960 [ 32.457318] ? mutex_trylock+0x1a0/0x1a0 [ 32.461357] ? create_page_buffers+0x212/0x350 [ 32.465915] ? alloc_page_buffers+0x2da/0x5c0 [ 32.470386] ? lock_downgrade+0x720/0x720 [ 32.474524] ? do_raw_spin_lock+0xcb/0x220 [ 32.478736] hfsplus_get_block+0x292/0x960 [ 32.482947] block_read_full_page+0x288/0xd10 [ 32.487441] ? hfsplus_file_extend+0xf40/0xf40 [ 32.492002] ? __bread_gfp+0x300/0x300 [ 32.495866] ? add_to_page_cache_locked+0x40/0x40 [ 32.500685] do_read_cache_page+0x533/0x1170 [ 32.505069] ? hfsplus_bmap+0x30/0x30 [ 32.508847] hfsplus_block_free+0x18b/0x5d0 [ 32.513143] ? __mutex_unlock_slowpath+0xea/0x610 [ 32.517960] hfsplus_free_extents+0x228/0x520 [ 32.522435] hfsplus_file_truncate+0xd96/0x1040 [ 32.527079] ? hfsplus_get_block+0x960/0x960 [ 32.531461] ? up_write+0x18/0x150 [ 32.534977] ? unmap_mapping_pages+0x121/0x2b0 [ 32.539553] ? inode_newsize_ok+0x121/0x1e0 [ 32.543857] hfsplus_setattr+0x1e7/0x310 [ 32.547894] ? hfsplus_file_open+0x140/0x140 [ 32.552277] notify_change+0x70b/0xfc0 [ 32.556142] do_truncate+0x134/0x1f0 [ 32.559829] ? dentry_open+0x1d0/0x1d0 [ 32.563691] ? apparmor_path_truncate+0x183/0x200 [ 32.568509] ? inode_permission+0x3d/0x140 [ 32.572719] path_openat+0x2308/0x2df0 [ 32.576593] ? path_lookupat+0x8d0/0x8d0 [ 32.580629] ? mark_held_locks+0xf0/0xf0 [ 32.584663] ? __lock_acquire+0x6de/0x3ff0 [ 32.588958] do_filp_open+0x18c/0x3f0 [ 32.592734] ? may_open_dev+0xf0/0xf0 [ 32.596514] ? lock_downgrade+0x720/0x720 [ 32.600637] ? lock_acquire+0x170/0x3c0 [ 32.604606] ? __alloc_fd+0x34/0x570 [ 32.608295] ? do_raw_spin_unlock+0x171/0x230 [ 32.612765] ? _raw_spin_unlock+0x29/0x40 [ 32.616885] ? __alloc_fd+0x28d/0x570 [ 32.620661] do_sys_open+0x3b3/0x520 [ 32.624349] ? filp_open+0x70/0x70 [ 32.627865] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.633205] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.638193] ? do_syscall_64+0x21/0x620 [ 32.642153] do_syscall_64+0xf9/0x620 [ 32.645936] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.651107] RIP: 0033:0x7f7c18320779 [ 32.654799] 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 [ 32.673683] RSP: 002b:00007ffd61409838 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 32.681366] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f7c1832