Warning: Permanently added '10.128.0.147' (ECDSA) to the list of known hosts. executing program [ 28.845840] hfsplus: xattr searching failed [ 28.850586] [ 28.852196] ============================================ [ 28.857613] WARNING: possible recursive locking detected [ 28.863059] 4.14.302-syzkaller #0 Not tainted [ 28.867526] -------------------------------------------- [ 28.872955] syz-executor196/7976 is trying to acquire lock: [ 28.878643] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 28.888588] [ 28.888588] but task is already holding lock: [ 28.894523] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.904811] [ 28.904811] other info that might help us debug this: [ 28.911533] Possible unsafe locking scenario: [ 28.911533] [ 28.917557] CPU0 [ 28.920110] ---- [ 28.922658] lock(&HFSPLUS_I(inode)->extents_lock); [ 28.927731] lock(&HFSPLUS_I(inode)->extents_lock); [ 28.932805] [ 28.932805] *** DEADLOCK *** [ 28.932805] [ 28.938843] May be due to missing lock nesting notation [ 28.938843] [ 28.945741] 5 locks held by syz-executor196/7976: [ 28.950549] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 28.958936] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 28.968357] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.979080] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 28.988324] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 28.997482] [ 28.997482] stack backtrace: [ 29.001949] CPU: 0 PID: 7976 Comm: syz-executor196 Not tainted 4.14.302-syzkaller #0 [ 29.009797] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 29.019122] Call Trace: [ 29.021688] dump_stack+0x1b2/0x281 [ 29.025298] __lock_acquire.cold+0x180/0x97c [ 29.029682] ? register_lock_class+0x1d0/0x1180 [ 29.034324] ? trace_hardirqs_on+0x10/0x10 [ 29.038531] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 29.043867] ? save_trace+0xd6/0x290 [ 29.047551] ? __lock_acquire+0x2190/0x3f20 [ 29.052625] lock_acquire+0x170/0x3f0 [ 29.056398] ? hfsplus_get_block+0x1f9/0x820 [ 29.060779] ? hfsplus_get_block+0x1f9/0x820 [ 29.065159] __mutex_lock+0xc4/0x1310 [ 29.068929] ? hfsplus_get_block+0x1f9/0x820 [ 29.073309] ? hfsplus_get_block+0x1f9/0x820 [ 29.077689] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.083110] ? lock_acquire+0x170/0x3f0 [ 29.087056] ? create_page_buffers+0x14d/0x1c0 [ 29.091609] hfsplus_get_block+0x1f9/0x820 [ 29.095814] ? _raw_spin_unlock+0x29/0x40 [ 29.099932] ? create_page_buffers+0xce/0x1c0 [ 29.104398] block_read_full_page+0x25e/0x8d0 [ 29.108862] ? hfsplus_file_extend+0xef0/0xef0 [ 29.113416] ? __lru_cache_add+0x178/0x250 [ 29.117622] ? __bread_gfp+0x2e0/0x2e0 [ 29.121481] ? add_to_page_cache_lru+0x136/0x2b0 [ 29.126208] ? add_to_page_cache_locked+0x40/0x40 [ 29.131021] ? alloc_pages_current+0x15d/0x260 [ 29.135574] do_read_cache_page+0x38e/0xc10 [ 29.139865] ? hfsplus_bmap+0x30/0x30 [ 29.143640] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.149065] hfsplus_block_free+0x177/0x560 [ 29.153358] hfsplus_free_extents+0x170/0x440 [ 29.157823] hfsplus_file_truncate+0xbc0/0xe80 [ 29.162375] ? hfsplus_get_block+0x820/0x820 [ 29.166755] ? up_write+0x17/0x60 [ 29.170177] ? unmap_mapping_range+0xe9/0x250 [ 29.174646] ? inode_newsize_ok+0x145/0x1c0 [ 29.178937] hfsplus_setattr+0x182/0x310 [ 29.182967] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 29.187517] notify_change+0x56b/0xd10 [ 29.191376] do_truncate+0xff/0x1a0 [ 29.194971] ? finish_open+0x170/0x170 [ 29.198829] ? apparmor_path_truncate+0x163/0x1d0 [ 29.203645] path_openat+0x1dcc/0x2970 [ 29.207504] ? path_lookupat+0x780/0x780 [ 29.211538] ? trace_hardirqs_on+0x10/0x10 [ 29.215742] ? trace_hardirqs_on+0x10/0x10 [ 29.219946] do_filp_open+0x179/0x3c0 [ 29.223716] ? may_open_dev+0xe0/0xe0 [ 29.227486] ? lock_downgrade+0x740/0x740 [ 29.231607] ? do_raw_spin_unlock+0x164/0x220 [ 29.236070] ? _raw_spin_unlock+0x29/0x40 [ 29.240190] ? __alloc_fd+0x1be/0x490 [ 29.243958] ? _raw_spin_unlock_irq+0x24/0x80 [ 29.248422] do_sys_open+0x296/0x410 [ 29.252105] ? filp_open+0x60/0x60 [ 29.255615] ? do_syscall_64+0x4c/0x640 [ 29.259559] ? compat_SyS_openat+0x30/0x30 [ 29.263763] do_syscall_64+0x1d5/0x640 [ 29.267620] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.272783] RIP: 0033:0x7f93543e3779 [ 29.276471] RSP: 002b:00007ffe3f1af9f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 29.284145] RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007f93543e3779 [ 29.291386] RDX: 00007f93543a1df3 RSI: 0000000000000000 RDI: 0000000020000980 [ 29.298627] RBP: 00007f93543a3010 R08: 00000000000005cd R09: 0000000000000000 [ 29.305870] R10: 00007ffe3f1af8c0 R11: 0000000000000246 R12: 00007f93543a30a0 [ 29.313108] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000