Warning: Permanently added '10.128.10.62' (ECDSA) to the list of known hosts. executing program [ 29.225257] hfsplus: xattr searching failed [ 29.230938] [ 29.232568] ============================================ [ 29.238006] WARNING: possible recursive locking detected [ 29.243490] 4.14.302-syzkaller #0 Not tainted [ 29.247977] -------------------------------------------- [ 29.254635] syz-executor173/7974 is trying to acquire lock: [ 29.260340] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 29.270305] [ 29.270305] but task is already holding lock: [ 29.276249] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 29.286550] [ 29.286550] other info that might help us debug this: [ 29.293187] Possible unsafe locking scenario: [ 29.293187] [ 29.299222] CPU0 [ 29.301777] ---- [ 29.304331] lock(&HFSPLUS_I(inode)->extents_lock); [ 29.309408] lock(&HFSPLUS_I(inode)->extents_lock); [ 29.314485] [ 29.314485] *** DEADLOCK *** [ 29.314485] [ 29.320518] May be due to missing lock nesting notation [ 29.320518] [ 29.327416] 5 locks held by syz-executor173/7974: [ 29.332580] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 29.341149] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 29.350572] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 29.361307] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 29.370644] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 29.379809] [ 29.379809] stack backtrace: [ 29.384284] CPU: 0 PID: 7974 Comm: syz-executor173 Not tainted 4.14.302-syzkaller #0 [ 29.392138] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 29.401468] Call Trace: [ 29.404035] dump_stack+0x1b2/0x281 [ 29.407637] __lock_acquire.cold+0x180/0x97c [ 29.412045] ? register_lock_class+0x1d0/0x1180 [ 29.416693] ? trace_hardirqs_on+0x10/0x10 [ 29.420914] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 29.426258] ? save_trace+0xd6/0x290 [ 29.429948] ? __lock_acquire+0x2190/0x3f20 [ 29.434262] lock_acquire+0x170/0x3f0 [ 29.438048] ? hfsplus_get_block+0x1f9/0x820 [ 29.442439] ? hfsplus_get_block+0x1f9/0x820 [ 29.446823] __mutex_lock+0xc4/0x1310 [ 29.450598] ? hfsplus_get_block+0x1f9/0x820 [ 29.455111] ? hfsplus_get_block+0x1f9/0x820 [ 29.459503] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.464979] ? lock_acquire+0x170/0x3f0 [ 29.468928] ? create_page_buffers+0x14d/0x1c0 [ 29.473489] hfsplus_get_block+0x1f9/0x820 [ 29.477717] ? _raw_spin_unlock+0x29/0x40 [ 29.481845] ? create_page_buffers+0xce/0x1c0 [ 29.486315] block_read_full_page+0x25e/0x8d0 [ 29.490786] ? hfsplus_file_extend+0xef0/0xef0 [ 29.495372] ? __lru_cache_add+0x178/0x250 [ 29.499826] ? __bread_gfp+0x2e0/0x2e0 [ 29.503870] ? add_to_page_cache_lru+0x136/0x2b0 [ 29.508602] ? add_to_page_cache_locked+0x40/0x40 [ 29.513424] ? alloc_pages_current+0x15d/0x260 [ 29.517980] do_read_cache_page+0x38e/0xc10 [ 29.522373] ? hfsplus_bmap+0x30/0x30 [ 29.526162] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.531760] hfsplus_block_free+0x177/0x560 [ 29.536058] hfsplus_free_extents+0x170/0x440 [ 29.540528] hfsplus_file_truncate+0xbc0/0xe80 [ 29.545091] ? hfsplus_get_block+0x820/0x820 [ 29.549475] ? up_write+0x17/0x60 [ 29.552911] ? unmap_mapping_range+0xe9/0x250 [ 29.557383] ? inode_newsize_ok+0x145/0x1c0 [ 29.561699] hfsplus_setattr+0x182/0x310 [ 29.565804] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 29.570290] notify_change+0x56b/0xd10 [ 29.574244] do_truncate+0xff/0x1a0 [ 29.577863] ? finish_open+0x170/0x170 [ 29.581725] ? apparmor_path_truncate+0x163/0x1d0 [ 29.586631] path_openat+0x1dcc/0x2970 [ 29.590508] ? path_lookupat+0x780/0x780 [ 29.594546] ? trace_hardirqs_on+0x10/0x10 [ 29.598754] ? trace_hardirqs_on+0x10/0x10 [ 29.602961] do_filp_open+0x179/0x3c0 [ 29.606739] ? may_open_dev+0xe0/0xe0 [ 29.610515] ? lock_downgrade+0x740/0x740 [ 29.614636] ? do_raw_spin_unlock+0x164/0x220 [ 29.619108] ? _raw_spin_unlock+0x29/0x40 [ 29.623231] ? __alloc_fd+0x1be/0x490 [ 29.627009] ? _raw_spin_unlock_irq+0x24/0x80 [ 29.631482] do_sys_open+0x296/0x410 [ 29.635167] ? filp_open+0x60/0x60 [ 29.638680] ? do_syscall_64+0x4c/0x640 [ 29.642626] ? compat_SyS_openat+0x30/0x30 [ 29.646833] do_syscall_64+0x1d5/0x640 [ 29.650697] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.655863] RIP: 0033:0x7f348242c779 [ 29.659555] RSP: 002b:00007fff82986ef8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 29.667242] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f348242c779 [ 29.674488] RDX: 00007f34823eadf3 RSI: 0000000000000109 RDI: 00000000200001c0 [ 29.681822] RBP: 00007f34823ec010 R08: 00000000000005cd R09: 0000000000000000 [ 29.689067] R10: 00007fff82986dc0 R11: 0000000000000246 R12: 00007f34823ec0a0 [ 29.696312] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000