Warning: Permanently added '10.128.0.166' (ECDSA) to the list of known hosts. executing program [ 38.456223] hfsplus: xattr searching failed [ 38.461025] [ 38.462651] ============================================ [ 38.468085] WARNING: possible recursive locking detected [ 38.473522] 4.19.211-syzkaller #0 Not tainted [ 38.477987] -------------------------------------------- [ 38.483418] syz-executor331/8087 is trying to acquire lock: [ 38.489125] 000000000e962c31 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 38.498658] [ 38.498658] but task is already holding lock: [ 38.504602] 00000000b3a9cd3f (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 38.514550] [ 38.514550] other info that might help us debug this: [ 38.521277] Possible unsafe locking scenario: [ 38.521277] [ 38.527310] CPU0 [ 38.529867] ---- [ 38.532423] lock(&HFSPLUS_I(inode)->extents_lock); [ 38.537519] lock(&HFSPLUS_I(inode)->extents_lock); [ 38.542602] [ 38.542602] *** DEADLOCK *** [ 38.542602] [ 38.548721] May be due to missing lock nesting notation [ 38.548721] [ 38.555622] 4 locks held by syz-executor331/8087: [ 38.560440] #0: 00000000fd787b1b (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 38.568393] #1: 000000001f8065c1 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 38.577473] #2: 00000000b3a9cd3f (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 38.587858] #3: 00000000ee7d0ad6 (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 38.596594] [ 38.596594] stack backtrace: [ 38.601071] CPU: 1 PID: 8087 Comm: syz-executor331 Not tainted 4.19.211-syzkaller #0 [ 38.608927] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 38.618257] Call Trace: [ 38.620830] dump_stack+0x1fc/0x2ef [ 38.624436] __lock_acquire.cold+0x121/0x57e [ 38.628823] ? mark_held_locks+0xf0/0xf0 [ 38.632861] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 38.638200] ? save_trace+0xd6/0x290 [ 38.641890] ? __lock_acquire+0x22f9/0x3ff0 [ 38.646185] lock_acquire+0x170/0x3c0 [ 38.649967] ? hfsplus_get_block+0x292/0x960 [ 38.654353] ? hfsplus_get_block+0x292/0x960 [ 38.658737] __mutex_lock+0xd7/0x1190 [ 38.662516] ? hfsplus_get_block+0x292/0x960 [ 38.666903] ? check_preemption_disabled+0x41/0x280 [ 38.671895] ? hfsplus_get_block+0x292/0x960 [ 38.676282] ? mutex_trylock+0x1a0/0x1a0 [ 38.680320] ? create_page_buffers+0x212/0x350 [ 38.684879] ? alloc_page_buffers+0x2da/0x5c0 [ 38.689350] ? lock_downgrade+0x720/0x720 [ 38.693472] ? do_raw_spin_lock+0xcb/0x220 [ 38.697685] hfsplus_get_block+0x292/0x960 [ 38.701897] block_read_full_page+0x288/0xd10 [ 38.706369] ? hfsplus_file_extend+0xf40/0xf40 [ 38.710930] ? __bread_gfp+0x300/0x300 [ 38.714792] ? add_to_page_cache_locked+0x40/0x40 [ 38.719611] do_read_cache_page+0x533/0x1170 [ 38.723999] ? hfsplus_bmap+0x30/0x30 [ 38.727778] hfsplus_block_free+0x18b/0x5d0 [ 38.732086] ? __mutex_unlock_slowpath+0xea/0x610 [ 38.736906] hfsplus_free_extents+0x228/0x520 [ 38.741377] hfsplus_file_truncate+0xd96/0x1040 [ 38.746024] ? hfsplus_get_block+0x960/0x960 [ 38.750408] ? up_write+0x18/0x150 [ 38.753927] ? unmap_mapping_pages+0x121/0x2b0 [ 38.758492] ? inode_newsize_ok+0x121/0x1e0 [ 38.762791] hfsplus_setattr+0x1e7/0x310 [ 38.766830] ? hfsplus_file_open+0x140/0x140 [ 38.771226] notify_change+0x70b/0xfc0 [ 38.775213] do_truncate+0x134/0x1f0 [ 38.778915] ? dentry_open+0x1d0/0x1d0 [ 38.782787] ? apparmor_path_truncate+0x183/0x200 [ 38.787636] ? inode_permission+0x3d/0x140 [ 38.791852] path_openat+0x2308/0x2df0 [ 38.795718] ? path_lookupat+0x8d0/0x8d0 [ 38.799758] ? mark_held_locks+0xf0/0xf0 [ 38.803795] ? __lock_acquire+0x6de/0x3ff0 [ 38.808024] do_filp_open+0x18c/0x3f0 [ 38.811800] ? may_open_dev+0xf0/0xf0 [ 38.815580] ? lock_downgrade+0x720/0x720 [ 38.819703] ? lock_acquire+0x170/0x3c0 [ 38.823653] ? __alloc_fd+0x34/0x570 [ 38.827343] ? do_raw_spin_unlock+0x171/0x230 [ 38.831813] ? _raw_spin_unlock+0x29/0x40 [ 38.835935] ? __alloc_fd+0x28d/0x570 [ 38.839714] do_sys_open+0x3b3/0x520 [ 38.843409] ? filp_open+0x70/0x70 [ 38.846926] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 38.852272] ? trace_hardirqs_off_caller+0x6e/0x210 [ 38.857264] ? do_syscall_64+0x21/0x620 [ 38.861216] do_syscall_64+0xf9/0x620 [ 38.864996] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.870159] RIP: 0033:0x7f57bcf5e779 [ 38.873849] 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 [ 38.892726] RSP: 002b:00007ffde4e46168 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 38.900411] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f57bcf5e779 [ 38.90