Warning: Permanently added '10.128.1.119' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.920149] hfsplus: xattr searching failed [ 28.924852] [ 28.926468] ============================================ [ 28.931894] WARNING: possible recursive locking detected [ 28.937322] 4.14.302-syzkaller #0 Not tainted [ 28.941786] -------------------------------------------- [ 28.947204] syz-executor322/7988 is trying to acquire lock: [ 28.952881] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 28.962822] [ 28.962822] but task is already holding lock: [ 28.968759] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 28.979046] [ 28.979046] other info that might help us debug this: [ 28.985679] Possible unsafe locking scenario: [ 28.985679] [ 28.991706] CPU0 [ 28.994261] ---- [ 28.996811] lock(&HFSPLUS_I(inode)->extents_lock); [ 29.001886] lock(&HFSPLUS_I(inode)->extents_lock); [ 29.006959] [ 29.006959] *** DEADLOCK *** [ 29.006959] [ 29.012985] May be due to missing lock nesting notation [ 29.012985] [ 29.019878] 5 locks held by syz-executor322/7988: [ 29.024687] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 29.033065] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 29.042486] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 29.053204] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 29.062450] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 29.071609] [ 29.071609] stack backtrace: [ 29.076075] CPU: 1 PID: 7988 Comm: syz-executor322 Not tainted 4.14.302-syzkaller #0 [ 29.083923] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 29.093250] Call Trace: [ 29.095810] dump_stack+0x1b2/0x281 [ 29.099409] __lock_acquire.cold+0x180/0x97c [ 29.103792] ? register_lock_class+0x1d0/0x1180 [ 29.108458] ? trace_hardirqs_on+0x10/0x10 [ 29.112664] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 29.117997] ? save_trace+0xd6/0x290 [ 29.121683] ? __lock_acquire+0x2190/0x3f20 [ 29.125975] lock_acquire+0x170/0x3f0 [ 29.129746] ? hfsplus_get_block+0x1f9/0x820 [ 29.134125] ? hfsplus_get_block+0x1f9/0x820 [ 29.138503] __mutex_lock+0xc4/0x1310 [ 29.142272] ? hfsplus_get_block+0x1f9/0x820 [ 29.146651] ? hfsplus_get_block+0x1f9/0x820 [ 29.151032] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.156466] ? lock_acquire+0x170/0x3f0 [ 29.160416] ? create_page_buffers+0x14d/0x1c0 [ 29.164971] hfsplus_get_block+0x1f9/0x820 [ 29.169185] ? _raw_spin_unlock+0x29/0x40 [ 29.173303] ? create_page_buffers+0xce/0x1c0 [ 29.177774] block_read_full_page+0x25e/0x8d0 [ 29.182244] ? hfsplus_file_extend+0xef0/0xef0 [ 29.186799] ? __lru_cache_add+0x178/0x250 [ 29.191007] ? __bread_gfp+0x2e0/0x2e0 [ 29.194869] ? add_to_page_cache_lru+0x136/0x2b0 [ 29.199598] ? add_to_page_cache_locked+0x40/0x40 [ 29.204412] ? alloc_pages_current+0x15d/0x260 [ 29.208971] do_read_cache_page+0x38e/0xc10 [ 29.213326] ? hfsplus_bmap+0x30/0x30 [ 29.217111] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.222544] hfsplus_block_free+0x177/0x560 [ 29.226840] hfsplus_free_extents+0x170/0x440 [ 29.231305] hfsplus_file_truncate+0xbc0/0xe80 [ 29.235859] ? hfsplus_get_block+0x820/0x820 [ 29.240239] ? up_write+0x17/0x60 [ 29.243663] ? unmap_mapping_range+0xe9/0x250 [ 29.248128] ? inode_newsize_ok+0x145/0x1c0 [ 29.252421] hfsplus_setattr+0x182/0x310 [ 29.256454] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 29.260920] notify_change+0x56b/0xd10 [ 29.264780] do_truncate+0xff/0x1a0 [ 29.268377] ? finish_open+0x170/0x170 [ 29.272235] ? apparmor_path_truncate+0x163/0x1d0 [ 29.277048] path_openat+0x1dcc/0x2970 [ 29.280907] ? path_lookupat+0x780/0x780 [ 29.284942] ? trace_hardirqs_on+0x10/0x10 [ 29.289146] ? trace_hardirqs_on+0x10/0x10 [ 29.293350] do_filp_open+0x179/0x3c0 [ 29.297122] ? may_open_dev+0xe0/0xe0 [ 29.300892] ? lock_downgrade+0x740/0x740 [ 29.305015] ? do_raw_spin_unlock+0x164/0x220 [ 29.309481] ? _raw_spin_unlock+0x29/0x40 [ 29.313598] ? __alloc_fd+0x1be/0x490 [ 29.317370] ? _raw_spin_unlock_irq+0x24/0x80 [ 29.322621] do_sys_open+0x296/0x410 [ 29.326304] ? filp_open+0x60/0x60 [ 29.329814] ? do_syscall_64+0x4c/0x640 [ 29.333767] ? compat_SyS_openat+0x30/0x30 [ 29.337970] do_syscall_64+0x1d5/0x640 [ 29.341831] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 29.346991] RIP: 0033:0x7fcc082eb779 [ 29.350673] RSP: 002b:00007ffdc8248a98 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 29.358363] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007fcc082eb779 [ 29.365603] RDX: 00007fcc082a9df3 RSI: 0000000000000000 RDI: 0000000020000080 [ 29.372842] RBP: 00007fcc082ab010 R08: 00000000000005cd R09: 0000000000000000 [ 29.380081] R10: 00007ffdc8248960 R11: 0000000000000246 R12: 00007fcc082ab0a0 [ 29.387321] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000