Warning: Permanently added '10.128.1.23' (ECDSA) to the list of known hosts. executing program [ 28.120080] hfsplus: xattr searching failed [ 28.124876] [ 28.126497] ============================================ [ 28.131928] WARNING: possible recursive locking detected [ 28.137359] 4.14.302-syzkaller #0 Not tainted [ 28.141834] -------------------------------------------- [ 28.147259] syz-executor328/7994 is trying to acquire lock: [ 28.152936] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 28.162879] [ 28.162879] but task is already holding lock: [ 28.168815] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.179104] [ 28.179104] other info that might help us debug this: [ 28.185738] Possible unsafe locking scenario: [ 28.185738] [ 28.191772] CPU0 [ 28.194321] ---- [ 28.196876] lock(&HFSPLUS_I(inode)->extents_lock); [ 28.201948] lock(&HFSPLUS_I(inode)->extents_lock); [ 28.207018] [ 28.207018] *** DEADLOCK *** [ 28.207018] [ 28.213046] May be due to missing lock nesting notation [ 28.213046] [ 28.219942] 5 locks held by syz-executor328/7994: [ 28.224756] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 28.233159] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 28.242577] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.253298] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 28.262544] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 28.271708] [ 28.271708] stack backtrace: [ 28.276178] CPU: 1 PID: 7994 Comm: syz-executor328 Not tainted 4.14.302-syzkaller #0 [ 28.284028] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 28.293352] Call Trace: [ 28.295913] dump_stack+0x1b2/0x281 [ 28.299515] __lock_acquire.cold+0x180/0x97c [ 28.303900] ? register_lock_class+0x1d0/0x1180 [ 28.308538] ? trace_hardirqs_on+0x10/0x10 [ 28.312743] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 28.318074] ? save_trace+0xd6/0x290 [ 28.321757] ? __lock_acquire+0x2190/0x3f20 [ 28.326049] lock_acquire+0x170/0x3f0 [ 28.329822] ? hfsplus_get_block+0x1f9/0x820 [ 28.334199] ? hfsplus_get_block+0x1f9/0x820 [ 28.338579] __mutex_lock+0xc4/0x1310 [ 28.342350] ? hfsplus_get_block+0x1f9/0x820 [ 28.346732] ? hfsplus_get_block+0x1f9/0x820 [ 28.351114] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.356535] ? lock_acquire+0x170/0x3f0 [ 28.360481] ? create_page_buffers+0x14d/0x1c0 [ 28.365034] hfsplus_get_block+0x1f9/0x820 [ 28.369240] ? _raw_spin_unlock+0x29/0x40 [ 28.373357] ? create_page_buffers+0xce/0x1c0 [ 28.377822] block_read_full_page+0x25e/0x8d0 [ 28.382289] ? hfsplus_file_extend+0xef0/0xef0 [ 28.386861] ? __lru_cache_add+0x178/0x250 [ 28.391067] ? __bread_gfp+0x2e0/0x2e0 [ 28.394925] ? add_to_page_cache_lru+0x136/0x2b0 [ 28.399667] ? add_to_page_cache_locked+0x40/0x40 [ 28.404479] ? alloc_pages_current+0x15d/0x260 [ 28.409031] do_read_cache_page+0x38e/0xc10 [ 28.413321] ? hfsplus_bmap+0x30/0x30 [ 28.417093] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.422514] hfsplus_block_free+0x177/0x560 [ 28.426805] hfsplus_free_extents+0x170/0x440 [ 28.431275] hfsplus_file_truncate+0xbc0/0xe80 [ 28.435858] ? hfsplus_get_block+0x820/0x820 [ 28.440235] ? up_write+0x17/0x60 [ 28.443665] ? unmap_mapping_range+0xe9/0x250 [ 28.448136] ? inode_newsize_ok+0x145/0x1c0 [ 28.452436] hfsplus_setattr+0x182/0x310 [ 28.456468] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 28.460931] notify_change+0x56b/0xd10 [ 28.464789] do_truncate+0xff/0x1a0 [ 28.468391] ? finish_open+0x170/0x170 [ 28.472248] ? apparmor_path_truncate+0x163/0x1d0 [ 28.477065] path_openat+0x1dcc/0x2970 [ 28.480924] ? path_lookupat+0x780/0x780 [ 28.484954] ? trace_hardirqs_on+0x10/0x10 [ 28.489158] ? trace_hardirqs_on+0x10/0x10 [ 28.493364] do_filp_open+0x179/0x3c0 [ 28.497135] ? may_open_dev+0xe0/0xe0 [ 28.501081] ? lock_downgrade+0x740/0x740 [ 28.505199] ? do_raw_spin_unlock+0x164/0x220 [ 28.509664] ? _raw_spin_unlock+0x29/0x40 [ 28.513781] ? __alloc_fd+0x1be/0x490 [ 28.517552] ? _raw_spin_unlock_irq+0x24/0x80 [ 28.522017] do_sys_open+0x296/0x410 [ 28.525701] ? filp_open+0x60/0x60 [ 28.529212] ? do_syscall_64+0x4c/0x640 [ 28.533170] ? compat_SyS_openat+0x30/0x30 [ 28.537383] do_syscall_64+0x1d5/0x640 [ 28.541252] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 28.546416] RIP: 0033:0x7ff7842e7779 [ 28.550106] RSP: 002b:00007fffbb7b22d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 28.557797] RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007ff7842e7779 [ 28.565050] RDX: 00007ff7842a5df3 RSI: 00000000000001ea RDI: 0000000020000080 [ 28.572294] RBP: 00007ff7842a7010 R08: 00000000000005cd R09: 0000000000000000 [ 28.579537] R10: 00007fffbb7b21a0 R11: 0000000000000246 R12: 00007ff7842a70a0 [ 28.586780] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000