Warning: Permanently added '10.128.0.245' (ECDSA) to the list of known hosts. executing program [ 31.056884] hfsplus: xattr searching failed [ 31.061470] [ 31.063074] ============================================ [ 31.068498] WARNING: possible recursive locking detected [ 31.074020] 4.14.301-syzkaller #0 Not tainted [ 31.078495] -------------------------------------------- [ 31.083915] syz-executor302/7957 is trying to acquire lock: [ 31.089592] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 31.099536] [ 31.099536] but task is already holding lock: [ 31.105476] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 31.115764] [ 31.115764] other info that might help us debug this: [ 31.122405] Possible unsafe locking scenario: [ 31.122405] [ 31.128437] CPU0 [ 31.130997] ---- [ 31.133552] lock(&HFSPLUS_I(inode)->extents_lock); [ 31.138625] lock(&HFSPLUS_I(inode)->extents_lock); [ 31.143700] [ 31.143700] *** DEADLOCK *** [ 31.143700] [ 31.149727] May be due to missing lock nesting notation [ 31.149727] [ 31.156627] 5 locks held by syz-executor302/7957: [ 31.161438] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 31.169828] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 31.179249] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 31.189970] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 31.199238] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 31.208398] [ 31.208398] stack backtrace: [ 31.212866] CPU: 0 PID: 7957 Comm: syz-executor302 Not tainted 4.14.301-syzkaller #0 [ 31.220716] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 31.230040] Call Trace: [ 31.232605] dump_stack+0x1b2/0x281 [ 31.236206] __lock_acquire.cold+0x180/0x97c [ 31.240589] ? register_lock_class+0x1d0/0x1180 [ 31.245229] ? trace_hardirqs_on+0x10/0x10 [ 31.249435] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 31.254772] ? save_trace+0xd6/0x290 [ 31.258458] ? __lock_acquire+0x2190/0x3f20 [ 31.262773] lock_acquire+0x170/0x3f0 [ 31.266561] ? hfsplus_get_block+0x1f9/0x820 [ 31.270949] ? hfsplus_get_block+0x1f9/0x820 [ 31.275351] __mutex_lock+0xc4/0x1310 [ 31.279128] ? hfsplus_get_block+0x1f9/0x820 [ 31.283620] ? hfsplus_get_block+0x1f9/0x820 [ 31.287999] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.293436] ? lock_acquire+0x170/0x3f0 [ 31.297381] ? create_page_buffers+0x14d/0x1c0 [ 31.301935] hfsplus_get_block+0x1f9/0x820 [ 31.306154] ? _raw_spin_unlock+0x29/0x40 [ 31.310273] ? create_page_buffers+0xce/0x1c0 [ 31.314824] block_read_full_page+0x25e/0x8d0 [ 31.319288] ? hfsplus_file_extend+0xef0/0xef0 [ 31.323841] ? __lru_cache_add+0x178/0x250 [ 31.328046] ? __bread_gfp+0x2e0/0x2e0 [ 31.331901] ? add_to_page_cache_lru+0x136/0x2b0 [ 31.336626] ? add_to_page_cache_locked+0x40/0x40 [ 31.341442] ? alloc_pages_current+0x15d/0x260 [ 31.345996] do_read_cache_page+0x38e/0xc10 [ 31.350290] ? hfsplus_bmap+0x30/0x30 [ 31.354067] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 31.359492] hfsplus_block_free+0x177/0x560 [ 31.363785] hfsplus_free_extents+0x170/0x440 [ 31.368270] hfsplus_file_truncate+0xbc0/0xe80 [ 31.372823] ? hfsplus_get_block+0x820/0x820 [ 31.377202] ? up_write+0x17/0x60 [ 31.380627] ? unmap_mapping_range+0xe9/0x250 [ 31.385094] ? inode_newsize_ok+0x145/0x1c0 [ 31.389391] hfsplus_setattr+0x182/0x310 [ 31.393456] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 31.397924] notify_change+0x56b/0xd10 [ 31.401784] do_truncate+0xff/0x1a0 [ 31.405382] ? finish_open+0x170/0x170 [ 31.409240] ? apparmor_path_truncate+0x163/0x1d0 [ 31.414054] path_openat+0x1dcc/0x2970 [ 31.417914] ? path_lookupat+0x780/0x780 [ 31.421944] ? trace_hardirqs_on+0x10/0x10 [ 31.426149] ? trace_hardirqs_on+0x10/0x10 [ 31.430355] do_filp_open+0x179/0x3c0 [ 31.434124] ? may_open_dev+0xe0/0xe0 [ 31.437907] ? lock_downgrade+0x740/0x740 [ 31.442024] ? do_raw_spin_unlock+0x164/0x220 [ 31.446490] ? _raw_spin_unlock+0x29/0x40 [ 31.450606] ? __alloc_fd+0x1be/0x490 [ 31.454379] ? _raw_spin_unlock_irq+0x24/0x80 [ 31.458858] do_sys_open+0x296/0x410 [ 31.462550] ? filp_open+0x60/0x60 [ 31.466059] ? do_syscall_64+0x4c/0x640 [ 31.470002] ? compat_SyS_openat+0x30/0x30 [ 31.474208] do_syscall_64+0x1d5/0x640 [ 31.478068] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 31.483228] RIP: 0033:0x7f5a26935779 [ 31.486910] RSP: 002b:00007fffc817a0e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 31.494675] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f5a26935779 [ 31.501915] RDX: 00007f5a268f3df3 RSI: 000000000000002c RDI: 0000000020000000 [ 31.509154] RBP: 00007f5a268f5010 R08: 00000000000005cd R09: 0000000000000000 [ 31.516397] R10: 00007fffc8179fb0 R11: 0000000000000246 R12: 00007f5a268f50a0 [ 31.523657] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000