Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.94' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.153089] hfsplus: xattr searching failed [ 32.165152] [ 32.166780] ============================================ [ 32.172212] WARNING: possible recursive locking detected [ 32.177636] 4.19.211-syzkaller #0 Not tainted [ 32.182099] -------------------------------------------- [ 32.187543] syz-executor177/8110 is trying to acquire lock: [ 32.193226] 000000007f272225 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 32.202742] [ 32.202742] but task is already holding lock: [ 32.208686] 00000000cf42da70 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.218633] [ 32.218633] other info that might help us debug this: [ 32.225271] Possible unsafe locking scenario: [ 32.225271] [ 32.231300] CPU0 [ 32.233852] ---- [ 32.236406] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.241480] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.246554] [ 32.246554] *** DEADLOCK *** [ 32.246554] [ 32.252584] May be due to missing lock nesting notation [ 32.252584] [ 32.259482] 4 locks held by syz-executor177/8110: [ 32.264296] #0: 000000004dfd48ab (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 32.272323] #1: 000000001f2134fb (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 32.281400] #2: 00000000cf42da70 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.291781] #3: 00000000018fe48a (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 32.300511] [ 32.300511] stack backtrace: [ 32.304993] CPU: 0 PID: 8110 Comm: syz-executor177 Not tainted 4.19.211-syzkaller #0 [ 32.312845] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.322170] Call Trace: [ 32.324734] dump_stack+0x1fc/0x2ef [ 32.328340] __lock_acquire.cold+0x121/0x57e [ 32.332729] ? mark_held_locks+0xf0/0xf0 [ 32.336766] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.342105] ? save_trace+0xd6/0x290 [ 32.345795] ? __lock_acquire+0x22f9/0x3ff0 [ 32.350094] lock_acquire+0x170/0x3c0 [ 32.353871] ? hfsplus_get_block+0x292/0x960 [ 32.358256] ? hfsplus_get_block+0x292/0x960 [ 32.362638] __mutex_lock+0xd7/0x1190 [ 32.366413] ? hfsplus_get_block+0x292/0x960 [ 32.370797] ? check_preemption_disabled+0x41/0x280 [ 32.375790] ? hfsplus_get_block+0x292/0x960 [ 32.380175] ? mutex_trylock+0x1a0/0x1a0 [ 32.384222] ? create_page_buffers+0x212/0x350 [ 32.388787] ? alloc_page_buffers+0x2da/0x5c0 [ 32.393258] ? lock_downgrade+0x720/0x720 [ 32.397380] ? do_raw_spin_lock+0xcb/0x220 [ 32.401591] hfsplus_get_block+0x292/0x960 [ 32.405806] block_read_full_page+0x288/0xd10 [ 32.410277] ? hfsplus_file_extend+0xf40/0xf40 [ 32.414837] ? __bread_gfp+0x300/0x300 [ 32.418701] ? add_to_page_cache_locked+0x40/0x40 [ 32.423519] do_read_cache_page+0x533/0x1170 [ 32.427906] ? hfsplus_bmap+0x30/0x30 [ 32.431683] hfsplus_block_free+0x18b/0x5d0 [ 32.435985] ? __mutex_unlock_slowpath+0xea/0x610 [ 32.440803] hfsplus_free_extents+0x228/0x520 [ 32.445273] hfsplus_file_truncate+0xd96/0x1040 [ 32.449921] ? hfsplus_get_block+0x960/0x960 [ 32.454311] ? up_write+0x18/0x150 [ 32.457828] ? unmap_mapping_pages+0x121/0x2b0 [ 32.462388] ? inode_newsize_ok+0x121/0x1e0 [ 32.466686] hfsplus_setattr+0x1e7/0x310 [ 32.470722] ? hfsplus_file_open+0x140/0x140 [ 32.475108] notify_change+0x70b/0xfc0 [ 32.478969] do_truncate+0x134/0x1f0 [ 32.482664] ? dentry_open+0x1d0/0x1d0 [ 32.486528] ? apparmor_path_truncate+0x183/0x200 [ 32.491351] ? inode_permission+0x3d/0x140 [ 32.495563] path_openat+0x2308/0x2df0 [ 32.499427] ? path_lookupat+0x8d0/0x8d0 [ 32.503463] ? mark_held_locks+0xf0/0xf0 [ 32.507500] ? __lock_acquire+0x6de/0x3ff0 [ 32.511710] do_filp_open+0x18c/0x3f0 [ 32.515484] ? may_open_dev+0xf0/0xf0 [ 32.519282] ? lock_downgrade+0x720/0x720 [ 32.523402] ? lock_acquire+0x170/0x3c0 [ 32.527353] ? __alloc_fd+0x34/0x570 [ 32.531042] ? do_raw_spin_unlock+0x171/0x230 [ 32.535512] ? _raw_spin_unlock+0x29/0x40 [ 32.539642] ? __alloc_fd+0x28d/0x570 [ 32.543422] do_sys_open+0x3b3/0x520 [ 32.547114] ? filp_open+0x70/0x70 [ 32.550631] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.555971] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.560961] ? do_syscall_64+0x21/0x620 [ 32.564910] do_syscall_64+0xf9/0x620 [ 32.568687] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.573850] RIP: 0033:0x7f34526c7779 [ 32.577542] 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.596417] RSP: 002b:00007ffc1a333ee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 32.604098