Warning: Permanently added '10.128.1.8' (ECDSA) to the list of known hosts. executing program [ 38.780795] hfsplus: xattr searching failed [ 38.786855] hfsplus: xattr searching failed [ 38.793363] [ 38.794990] ============================================ [ 38.800425] WARNING: possible recursive locking detected [ 38.805897] 4.14.302-syzkaller #0 Not tainted [ 38.810366] -------------------------------------------- [ 38.815873] syz-executor334/7967 is trying to acquire lock: [ 38.821582] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 38.831556] [ 38.831556] but task is already holding lock: [ 38.837507] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 38.847883] [ 38.847883] other info that might help us debug this: [ 38.854519] Possible unsafe locking scenario: [ 38.854519] [ 38.860560] CPU0 [ 38.863113] ---- [ 38.865663] lock(&HFSPLUS_I(inode)->extents_lock); [ 38.870736] lock(&HFSPLUS_I(inode)->extents_lock); [ 38.877026] [ 38.877026] *** DEADLOCK *** [ 38.877026] [ 38.883057] May be due to missing lock nesting notation [ 38.883057] [ 38.889956] 5 locks held by syz-executor334/7967: [ 38.894765] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 38.903150] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 38.912658] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 38.923398] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 38.932659] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 38.941818] [ 38.941818] stack backtrace: [ 38.946303] CPU: 0 PID: 7967 Comm: syz-executor334 Not tainted 4.14.302-syzkaller #0 [ 38.954168] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 38.963502] Call Trace: [ 38.966068] dump_stack+0x1b2/0x281 [ 38.969669] __lock_acquire.cold+0x180/0x97c [ 38.974053] ? register_lock_class+0x1d0/0x1180 [ 38.978784] ? trace_hardirqs_on+0x10/0x10 [ 38.982996] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 38.988329] ? save_trace+0xd6/0x290 [ 38.992012] ? __lock_acquire+0x2190/0x3f20 [ 38.996305] lock_acquire+0x170/0x3f0 [ 39.000083] ? hfsplus_get_block+0x1f9/0x820 [ 39.004462] ? hfsplus_get_block+0x1f9/0x820 [ 39.008845] __mutex_lock+0xc4/0x1310 [ 39.012617] ? hfsplus_get_block+0x1f9/0x820 [ 39.017003] ? hfsplus_get_block+0x1f9/0x820 [ 39.021384] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 39.026811] ? lock_acquire+0x170/0x3f0 [ 39.030758] ? create_page_buffers+0x14d/0x1c0 [ 39.035330] hfsplus_get_block+0x1f9/0x820 [ 39.039711] ? _raw_spin_unlock+0x29/0x40 [ 39.043831] ? create_page_buffers+0xce/0x1c0 [ 39.048310] block_read_full_page+0x25e/0x8d0 [ 39.052779] ? hfsplus_file_extend+0xef0/0xef0 [ 39.057353] ? __lru_cache_add+0x178/0x250 [ 39.061559] ? __bread_gfp+0x2e0/0x2e0 [ 39.065421] ? add_to_page_cache_lru+0x136/0x2b0 [ 39.070157] ? add_to_page_cache_locked+0x40/0x40 [ 39.074978] ? alloc_pages_current+0x15d/0x260 [ 39.079531] do_read_cache_page+0x38e/0xc10 [ 39.083917] ? hfsplus_bmap+0x30/0x30 [ 39.087696] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 39.093120] hfsplus_block_free+0x177/0x560 [ 39.097417] hfsplus_free_extents+0x170/0x440 [ 39.101885] hfsplus_file_truncate+0xbc0/0xe80 [ 39.106449] ? hfsplus_get_block+0x820/0x820 [ 39.110828] ? up_write+0x17/0x60 [ 39.114277] ? unmap_mapping_range+0xe9/0x250 [ 39.118742] ? inode_newsize_ok+0x145/0x1c0 [ 39.123036] hfsplus_setattr+0x182/0x310 [ 39.127192] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 39.131670] notify_change+0x56b/0xd10 [ 39.135545] do_truncate+0xff/0x1a0 [ 39.139163] ? finish_open+0x170/0x170 [ 39.143042] ? apparmor_path_truncate+0x163/0x1d0 [ 39.148144] path_openat+0x1dcc/0x2970 [ 39.152022] ? path_lookupat+0x780/0x780 [ 39.156073] ? trace_hardirqs_on+0x10/0x10 [ 39.160279] ? trace_hardirqs_on+0x10/0x10 [ 39.164485] do_filp_open+0x179/0x3c0 [ 39.168259] ? may_open_dev+0xe0/0xe0 [ 39.172180] ? lock_downgrade+0x740/0x740 [ 39.176414] ? do_raw_spin_unlock+0x164/0x220 [ 39.180887] ? _raw_spin_unlock+0x29/0x40 [ 39.185012] ? __alloc_fd+0x1be/0x490 [ 39.188785] ? _raw_spin_unlock_irq+0x24/0x80 [ 39.193253] do_sys_open+0x296/0x410 [ 39.196943] ? filp_open+0x60/0x60 [ 39.200544] ? do_syscall_64+0x4c/0x640 [ 39.204492] ? SyS_open+0x30/0x30 [ 39.207916] do_syscall_64+0x1d5/0x640 [ 39.211777] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 39.216941] RIP: 0033:0x7effba985789 [ 39.220626] RSP: 002b:00007ffe99afb0b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 39.228305] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007effba985789 [ 39.235554] RDX: 0000000000000e00 RSI: 00000000200000c0 RDI: ffffffffffffff9c [ 39.242797] RBP: 00007effba945020 R08: 00000000000005cd R09: 0000000000000000 [ 39.250040] R10: 0000000000000014 R11: 0000000000000246 R12: 00007effba9450b0 [ 39.257281] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000