Warning: Permanently added '10.128.10.35' (ECDSA) to the list of known hosts. executing program [ 32.904081] hfsplus: xattr searching failed [ 32.909061] [ 32.910684] ============================================ [ 32.916121] WARNING: possible recursive locking detected [ 32.921544] 4.14.302-syzkaller #0 Not tainted [ 32.926007] -------------------------------------------- [ 32.931436] syz-executor303/7981 is trying to acquire lock: [ 32.937114] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 32.947059] [ 32.947059] but task is already holding lock: [ 32.953000] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 32.963293] [ 32.963293] other info that might help us debug this: [ 32.969946] Possible unsafe locking scenario: [ 32.969946] [ 32.976079] CPU0 [ 32.978639] ---- [ 32.981197] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.986281] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.991362] [ 32.991362] *** DEADLOCK *** [ 32.991362] [ 32.997393] May be due to missing lock nesting notation [ 32.997393] [ 33.004298] 5 locks held by syz-executor303/7981: [ 33.009110] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 33.017500] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 33.027074] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 33.037820] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 33.047080] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 33.056335] [ 33.056335] stack backtrace: [ 33.060806] CPU: 1 PID: 7981 Comm: syz-executor303 Not tainted 4.14.302-syzkaller #0 [ 33.068656] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 33.078072] Call Trace: [ 33.080636] dump_stack+0x1b2/0x281 [ 33.084237] __lock_acquire.cold+0x180/0x97c [ 33.088627] ? register_lock_class+0x1d0/0x1180 [ 33.093358] ? trace_hardirqs_on+0x10/0x10 [ 33.097565] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 33.102918] ? save_trace+0xd6/0x290 [ 33.106604] ? __lock_acquire+0x2190/0x3f20 [ 33.110900] lock_acquire+0x170/0x3f0 [ 33.114693] ? hfsplus_get_block+0x1f9/0x820 [ 33.119074] ? hfsplus_get_block+0x1f9/0x820 [ 33.123456] __mutex_lock+0xc4/0x1310 [ 33.127226] ? hfsplus_get_block+0x1f9/0x820 [ 33.131607] ? hfsplus_get_block+0x1f9/0x820 [ 33.135986] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 33.141410] ? lock_acquire+0x170/0x3f0 [ 33.145356] ? create_page_buffers+0x14d/0x1c0 [ 33.149998] hfsplus_get_block+0x1f9/0x820 [ 33.154219] ? _raw_spin_unlock+0x29/0x40 [ 33.158346] ? create_page_buffers+0xce/0x1c0 [ 33.162994] block_read_full_page+0x25e/0x8d0 [ 33.167471] ? hfsplus_file_extend+0xef0/0xef0 [ 33.172029] ? __lru_cache_add+0x178/0x250 [ 33.176241] ? __bread_gfp+0x2e0/0x2e0 [ 33.180106] ? add_to_page_cache_lru+0x136/0x2b0 [ 33.184837] ? add_to_page_cache_locked+0x40/0x40 [ 33.189654] ? alloc_pages_current+0x15d/0x260 [ 33.194209] do_read_cache_page+0x38e/0xc10 [ 33.198522] ? hfsplus_bmap+0x30/0x30 [ 33.202325] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 33.207756] hfsplus_block_free+0x177/0x560 [ 33.212055] hfsplus_free_extents+0x170/0x440 [ 33.216524] hfsplus_file_truncate+0xbc0/0xe80 [ 33.221081] ? hfsplus_get_block+0x820/0x820 [ 33.225464] ? up_write+0x17/0x60 [ 33.228889] ? unmap_mapping_range+0xe9/0x250 [ 33.233380] ? inode_newsize_ok+0x145/0x1c0 [ 33.237676] hfsplus_setattr+0x182/0x310 [ 33.241708] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 33.246176] notify_change+0x56b/0xd10 [ 33.250034] do_truncate+0xff/0x1a0 [ 33.253632] ? finish_open+0x170/0x170 [ 33.257498] ? apparmor_path_truncate+0x163/0x1d0 [ 33.262322] path_openat+0x1dcc/0x2970 [ 33.266185] ? path_lookupat+0x780/0x780 [ 33.270220] ? trace_hardirqs_on+0x10/0x10 [ 33.274426] ? trace_hardirqs_on+0x10/0x10 [ 33.278633] do_filp_open+0x179/0x3c0 [ 33.282405] ? may_open_dev+0xe0/0xe0 [ 33.286180] ? lock_downgrade+0x740/0x740 [ 33.290303] ? do_raw_spin_unlock+0x164/0x220 [ 33.294777] ? _raw_spin_unlock+0x29/0x40 [ 33.298897] ? __alloc_fd+0x1be/0x490 [ 33.302669] ? _raw_spin_unlock_irq+0x24/0x80 [ 33.307136] do_sys_open+0x296/0x410 [ 33.310821] ? filp_open+0x60/0x60 [ 33.314336] ? do_syscall_64+0x4c/0x640 [ 33.318280] ? compat_SyS_openat+0x30/0x30 [ 33.322486] do_syscall_64+0x1d5/0x640 [ 33.326346] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 33.331509] RIP: 0033:0x7fed50cad789 [ 33.335192] RSP: 002b:00007fffe436aea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 33.342871] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fed50cad789 [ 33.350113] RDX: 00007fed50c6be03 RSI: 0000000000000000 RDI: 00000000200000c0 [ 33.357353] RBP: 00007fed50c6d020 R08: 00000000000005e1 R09: 0000000000000000 [ 33.364595] R10: 00007fffe436ad70 R11: 0000000000000246 R12: 00007fed50c6d0b0 [ 33.371835] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000