Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.10.50' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.435689] ====================================================== [ 32.435689] WARNING: the mand mount option is being deprecated and [ 32.435689] will be removed in v5.15! [ 32.435689] ====================================================== [ 32.478497] [ 32.480164] ============================================ [ 32.485606] WARNING: possible recursive locking detected [ 32.491050] 4.19.211-syzkaller #0 Not tainted [ 32.495556] -------------------------------------------- [ 32.500995] syz-executor237/8096 is trying to acquire lock: [ 32.506684] 00000000c332e86b (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_extend+0x1bb/0xf40 [ 32.516381] [ 32.516381] but task is already holding lock: [ 32.522328] 0000000086464514 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_extend+0x1bb/0xf40 [ 32.532018] [ 32.532018] other info that might help us debug this: [ 32.538687] Possible unsafe locking scenario: [ 32.538687] [ 32.544723] CPU0 [ 32.547280] ---- [ 32.549836] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.554916] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.559993] [ 32.559993] *** DEADLOCK *** [ 32.559993] [ 32.566025] May be due to missing lock nesting notation [ 32.566025] [ 32.572935] 4 locks held by syz-executor237/8096: [ 32.577755] #0: 00000000bbc7cafe (sb_writers#11){.+.+}, at: do_sys_ftruncate+0x297/0x560 [ 32.586064] #1: 00000000ff4bafdd (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 32.595147] #2: 0000000086464514 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_extend+0x1bb/0xf40 [ 32.605273] #3: 00000000f5e68561 (&tree->tree_lock/1){+.+.}, at: hfsplus_find_init+0x170/0x220 [ 32.614093] [ 32.614093] stack backtrace: [ 32.618572] CPU: 0 PID: 8096 Comm: syz-executor237 Not tainted 4.19.211-syzkaller #0 [ 32.626428] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.635760] Call Trace: [ 32.638332] dump_stack+0x1fc/0x2ef [ 32.641939] __lock_acquire.cold+0x121/0x57e [ 32.646327] ? is_bpf_text_address+0xfc/0x1b0 [ 32.650803] ? mark_held_locks+0xf0/0xf0 [ 32.654844] ? __kernel_text_address+0x9/0x30 [ 32.659318] ? unwind_get_return_address+0x51/0x90 [ 32.664226] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.669575] ? __save_stack_trace+0xaf/0x190 [ 32.673963] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.679303] ? save_trace+0xd6/0x290 [ 32.682997] lock_acquire+0x170/0x3c0 [ 32.686779] ? hfsplus_file_extend+0x1bb/0xf40 [ 32.691341] ? hfsplus_file_extend+0x1bb/0xf40 [ 32.695901] __mutex_lock+0xd7/0x1190 [ 32.699678] ? hfsplus_file_extend+0x1bb/0xf40 [ 32.704237] ? mark_held_locks+0xf0/0xf0 [ 32.708278] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 32.713444] ? depot_save_stack+0x258/0x410 [ 32.717745] ? hfsplus_file_extend+0x1bb/0xf40 [ 32.722308] ? mutex_trylock+0x1a0/0x1a0 [ 32.726348] ? kasan_kmalloc+0x139/0x160 [ 32.730388] ? __kmalloc+0x15a/0x3c0 [ 32.734080] ? hfsplus_find_init+0x91/0x220 [ 32.738380] ? hfsplus_ext_read_extent+0x186/0xab0 [ 32.743288] ? hfsplus_file_extend+0x672/0xf40 [ 32.747852] ? __block_write_begin_int+0x46c/0x17b0 [ 32.752845] ? block_write_begin+0x58/0x2e0 [ 32.757142] ? cont_write_begin+0x55a/0x820 [ 32.761450] ? hfsplus_write_begin+0x87/0x150 [ 32.765921] ? cont_write_begin+0x2ee/0x820 [ 32.770219] ? hfsplus_write_begin+0x87/0x150 [ 32.774692] ? generic_cont_expand_simple+0x106/0x170 [ 32.779864] hfsplus_file_extend+0x1bb/0xf40 [ 32.784257] ? hfsplus_free_fork+0x7e0/0x7e0 [ 32.788642] ? __lock_acquire+0x6de/0x3ff0 [ 32.792855] ? hfsplus_find_init+0x170/0x220 [ 32.797242] ? mutex_trylock+0x1a0/0x1a0 [ 32.801279] ? hfsplus_brec_find+0x406/0x500 [ 32.805662] ? hfsplus_brec_remove+0x4e0/0x4e0 [ 32.810222] hfsplus_bmap_reserve+0x298/0x440 [ 32.814705] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 32.819703] __hfsplus_ext_write_extent+0x45b/0x5a0 [ 32.824702] hfsplus_ext_read_extent+0x910/0xab0 [ 32.829436] ? __hfsplus_ext_write_extent+0x5a0/0x5a0 [ 32.834605] ? hfsplus_get_block+0x3d4/0x960 [ 32.838991] hfsplus_file_extend+0x672/0xf40 [ 32.843638] ? hfsplus_free_fork+0x7e0/0x7e0 [ 32.848025] ? check_preemption_disabled+0x41/0x280 [ 32.853019] ? end_buffer_write_sync+0x110/0x110 [ 32.857752] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 32.862760] ? __mark_inode_dirty+0x23f/0x1140 [ 32.867323] hfsplus_get_block+0x196/0x960 [ 32.871573] __block_write_begin_int+0x46c/0x17b0 [ 32.876403] ? hfsplus_file_extend+0xf40/0xf40 [ 32.880972] ? __breadahead_gfp+0x130/0x130 [ 32.885280] ? wait_for_stable_page+0x122/0x360 [ 32.889930] ? hfsplus_file_extend+0xf40/0xf40 [ 32.894489] block_write_begin+0x58/0x2e0 [ 32.898620] cont_write_begin+0x55a/0x820 [ 32.902747] ? check_preemption_disabled+0x41/0x280 [ 32.907743] ? lock_downgrade+0x720/0x720 [ 32.911868] ? hfsplus_file_extend+0xf40/0xf40 [ 32.916430] ? check_preemption_disabled+0x41/0x280 [ 32.921426] ? block_write_begin+0x2e0/0x2e0 [ 32.925813] ? balance_dirty_pages_ratelimited+0x684/0x1df0 [ 32.931505] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 32.936500] ? __mark_inode_dirty+0x23f/0x1140 [ 32.941065] hfsplus_write_begin+0x87/0x150 [ 32.945364] ? hfsplus_file_extend+0xf40/0xf40 [ 32.949925] cont_write_begin+0x2ee/0x820 [ 32.954051] ? hfsplus_file_extend+0xf40/0xf40 [ 32.958612] ? __lock_acquire+0x22f9/0x3ff0 [ 32.962910] ? block_write_begin+0x2e0/0x2e0 [ 32.967303] ? current_time+0x6f/0x1c0 [ 32.971172] hfsplus_write_begin+0x87/0x150 [ 32.975474] ? hfsplus_file_extend+0xf40/0xf40 [ 32.980036] generic_cont_expand_simple+0x106/0x170 [ 32.985029] ? page_zero_new_buffers+0x600/0x600 [ 32.989762] ? inode_newsize_ok+0x121/0x1e0 [ 32.994060] ? setattr_prepare+0x135/0x7e0 [ 32.998273] hfsplus_setattr+0x18b/0x310 [ 33.002310] ? hfsplus_file_open+0x140/0x140 [ 33.006695] notify_change+0x70b/0xfc0 [ 33.010560] do_truncate+0x134/0x1f0 [ 33.014250] ? dentry_open+0x1d0/0x1d0 [ 33.018117] ? apparmor_path_truncate+0x183/0x200 [ 33.022935] do_sys_ftruncate+0x492/0x560 [ 33.027063] do_syscall_64+0xf9/0x620 [ 33.030846] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.036018] RIP: 0033:0x7f159ab94799 [ 33.039753] 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 [ 33.058635] RSP: 002b:00007fff6d5329f8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d [ 33.066319] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f159ab94799 [ 33.073577] RDX: 0000000000000000 RSI: 0000000002007ffb RDI: 0000000000000004 [ 33