Warning: Permanently added '10.128.0.251' (ECDSA) to the list of known hosts. executing program [ 29.722233] ====================================================== [ 29.722233] WARNING: the mand mount option is being deprecated and [ 29.722233] will be removed in v5.15! [ 29.722233] ====================================================== [ 29.762007] [ 29.763652] ============================================ [ 29.769092] WARNING: possible recursive locking detected [ 29.774620] 4.14.302-syzkaller #0 Not tainted [ 29.779100] -------------------------------------------- [ 29.784526] syz-executor729/7983 is trying to acquire lock: [ 29.790210] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_extend+0x188/0xef0 [ 29.800339] [ 29.800339] but task is already holding lock: [ 29.806294] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_extend+0x188/0xef0 [ 29.816416] [ 29.816416] other info that might help us debug this: [ 29.823064] Possible unsafe locking scenario: [ 29.823064] [ 29.829112] CPU0 [ 29.831681] ---- [ 29.834252] lock(&HFSPLUS_I(inode)->extents_lock); [ 29.839336] lock(&HFSPLUS_I(inode)->extents_lock); [ 29.844416] [ 29.844416] *** DEADLOCK *** [ 29.844416] [ 29.850450] May be due to missing lock nesting notation [ 29.850450] [ 29.857383] 4 locks held by syz-executor729/7983: [ 29.862289] #0: (sb_writers#10){.+.+}, at: [] do_sys_ftruncate.constprop.0+0x1fb/0x480 [ 29.872087] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 29.881523] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_extend+0x188/0xef0 [ 29.892086] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 29.901347] [ 29.901347] stack backtrace: [ 29.905826] CPU: 1 PID: 7983 Comm: syz-executor729 Not tainted 4.14.302-syzkaller #0 [ 29.913708] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 29.923042] Call Trace: [ 29.925615] dump_stack+0x1b2/0x281 [ 29.929220] __lock_acquire.cold+0x180/0x97c [ 29.933607] ? kernel_text_address+0xbd/0xf0 [ 29.937994] ? trace_hardirqs_on+0x10/0x10 [ 29.942209] ? entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.947552] ? __save_stack_trace+0xa0/0x160 [ 29.951943] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 29.957283] ? save_trace+0xd6/0x290 [ 29.961152] lock_acquire+0x170/0x3f0 [ 29.964956] ? hfsplus_file_extend+0x188/0xef0 [ 29.969522] ? hfsplus_file_extend+0x188/0xef0 [ 29.974087] __mutex_lock+0xc4/0x1310 [ 29.977868] ? hfsplus_file_extend+0x188/0xef0 [ 29.982431] ? trace_hardirqs_on+0x10/0x10 [ 29.986645] ? hfsplus_file_extend+0x188/0xef0 [ 29.991208] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.996635] ? __kmalloc+0x15a/0x400 [ 30.000326] ? hfsplus_find_init+0x91/0x220 [ 30.004627] ? hfsplus_ext_read_extent+0x15f/0x9e0 [ 30.009535] ? hfsplus_file_extend+0x616/0xef0 [ 30.014097] ? __block_write_begin_int+0x35c/0x11d0 [ 30.019088] ? block_write_begin+0x58/0x270 [ 30.023385] ? cont_write_begin+0x4a3/0x740 [ 30.027689] ? hfsplus_write_begin+0x87/0x130 [ 30.032162] ? hfsplus_write_begin+0x87/0x130 [ 30.036635] ? generic_cont_expand_simple+0xe1/0x130 [ 30.041718] ? hfsplus_setattr+0x139/0x310 [ 30.045934] ? notify_change+0x56b/0xd10 [ 30.050000] ? lock_acquire+0x170/0x3f0 [ 30.053956] hfsplus_file_extend+0x188/0xef0 [ 30.058344] ? hfsplus_find_init+0x161/0x220 [ 30.062735] ? hfsplus_free_fork+0x720/0x720 [ 30.067124] ? mem_cgroup_id_get_online+0xb0/0xb0 [ 30.071948] ? hfsplus_find_init+0x161/0x220 [ 30.076332] ? fs_reclaim_release+0xd0/0x110 [ 30.080720] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 30.086148] ? hfsplus_brec_find+0x37b/0x460 [ 30.090548] ? hfsplus_brec_remove+0x480/0x480 [ 30.095116] hfsplus_bmap_reserve+0x26e/0x410 [ 30.099688] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 30.104685] __hfsplus_ext_write_extent+0x415/0x560 [ 30.109682] hfsplus_ext_read_extent+0x81a/0x9e0 [ 30.114545] ? __hfsplus_ext_write_extent+0x560/0x560 [ 30.119721] ? find_get_entries+0x870/0x870 [ 30.124027] ? hfsplus_get_block+0x1f9/0x820 [ 30.128415] hfsplus_file_extend+0x616/0xef0 [ 30.132890] ? clean_bdev_aliases+0x40d/0x510 [ 30.137466] ? hfsplus_free_fork+0x720/0x720 [ 30.141855] ? invalidate_bh_lru+0x150/0x150 [ 30.146263] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 30.151278] hfsplus_get_block+0x15b/0x820 [ 30.155506] __block_write_begin_int+0x35c/0x11d0 [ 30.160334] ? hfsplus_file_extend+0xef0/0xef0 [ 30.164908] ? __breadahead_gfp+0x150/0x150 [ 30.169212] ? wait_for_stable_page+0xe3/0x260 [ 30.173772] ? hfsplus_file_extend+0xef0/0xef0 [ 30.178499] block_write_begin+0x58/0x270 [ 30.182720] cont_write_begin+0x4a3/0x740 [ 30.187037] ? block_write_begin+0x270/0x270 [ 30.191472] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 30.196466] ? __mark_inode_dirty+0x17d/0xf40 [ 30.200943] ? check_preemption_disabled+0x35/0x240 [ 30.206105] hfsplus_write_begin+0x87/0x130 [ 30.210431] ? hfsplus_file_extend+0xef0/0xef0 [ 30.214996] cont_write_begin+0x296/0x740 [ 30.219142] ? block_write_begin+0x270/0x270 [ 30.223542] ? mark_held_locks+0xa6/0xf0 [ 30.227590] hfsplus_write_begin+0x87/0x130 [ 30.231894] ? hfsplus_file_extend+0xef0/0xef0 [ 30.236454] generic_cont_expand_simple+0xe1/0x130 [ 30.241360] ? page_zero_new_buffers+0x420/0x420 [ 30.246208] ? inode_newsize_ok+0x145/0x1c0 [ 30.250510] ? setattr_prepare+0xbe/0x530 [ 30.254640] hfsplus_setattr+0x139/0x310 [ 30.258683] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 30.263152] notify_change+0x56b/0xd10 [ 30.267015] do_truncate+0xff/0x1a0 [ 30.270703] ? finish_open+0x170/0x170 [ 30.274585] ? apparmor_path_truncate+0x163/0x1d0 [ 30.279410] do_sys_ftruncate.constprop.0+0x3a3/0x480 [ 30.285362] ? compat_SyS_truncate+0x40/0x40 [ 30.289748] do_syscall_64+0x1d5/0x640 [ 30.293628] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 30.298802] RIP: 0033:0x7f273fdce799 [ 30.302493] RSP: 002b:00007ffd44f0db68 EFLAGS: 00000246 ORIG_RAX: 000000000000004d [ 30.310180] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f273fdce799 [ 30.317429] RDX: 0000000000000000 RSI: 0000000002007ffb RDI: 0000000000000004 [