Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.3' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.626359] [ 27.627991] ============================================ [ 27.633408] WARNING: possible recursive locking detected [ 27.638829] 4.14.301-syzkaller #0 Not tainted [ 27.643289] -------------------------------------------- [ 27.648707] syz-executor347/7979 is trying to acquire lock: [ 27.654381] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 27.664514] [ 27.664514] but task is already holding lock: [ 27.670465] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.680770] [ 27.680770] other info that might help us debug this: [ 27.687437] Possible unsafe locking scenario: [ 27.687437] [ 27.693466] CPU0 [ 27.696044] ---- [ 27.698599] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.703671] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.708743] [ 27.708743] *** DEADLOCK *** [ 27.708743] [ 27.714769] May be due to missing lock nesting notation [ 27.714769] [ 27.721666] 8 locks held by syz-executor347/7979: [ 27.726473] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 27.734853] #1: (&type->i_mutex_dir_key#7/1){+.+.}, at: [] lock_rename+0x225/0x280 [ 27.744286] #2: (&sb->s_type->i_mutex_key#18){+.+.}, at: [] lock_two_nondirectories+0xca/0xf0 [ 27.754677] #3: (&sb->s_type->i_mutex_key#17/4){+.+.}, at: [] lock_two_nondirectories+0xb2/0xf0 [ 27.765240] #4: (&sbi->vh_mutex){+.+.}, at: [] hfsplus_unlink+0x112/0x6b0 [ 27.773886] #5: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.785142] #6: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 27.794398] #7: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 27.803565] [ 27.803565] stack backtrace: [ 27.808043] CPU: 0 PID: 7979 Comm: syz-executor347 Not tainted 4.14.301-syzkaller #0 [ 27.815896] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 27.825228] Call Trace: [ 27.827804] dump_stack+0x1b2/0x281 [ 27.831407] __lock_acquire.cold+0x180/0x97c [ 27.835799] ? register_lock_class+0x1d0/0x1180 [ 27.840454] ? trace_hardirqs_on+0x10/0x10 [ 27.844660] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 27.849995] ? save_trace+0xd6/0x290 [ 27.853853] ? __lock_acquire+0x2190/0x3f20 [ 27.858151] lock_acquire+0x170/0x3f0 [ 27.861923] ? hfsplus_get_block+0x1f9/0x820 [ 27.866302] ? hfsplus_get_block+0x1f9/0x820 [ 27.870681] __mutex_lock+0xc4/0x1310 [ 27.874482] ? hfsplus_get_block+0x1f9/0x820 [ 27.878862] ? hfsplus_get_block+0x1f9/0x820 [ 27.883241] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.888662] ? lock_acquire+0x170/0x3f0 [ 27.892613] ? create_page_buffers+0x14d/0x1c0 [ 27.897175] hfsplus_get_block+0x1f9/0x820 [ 27.901386] ? _raw_spin_unlock+0x29/0x40 [ 27.905594] ? create_page_buffers+0xce/0x1c0 [ 27.910063] block_read_full_page+0x25e/0x8d0 [ 27.914528] ? hfsplus_file_extend+0xef0/0xef0 [ 27.919167] ? __lru_cache_add+0x178/0x250 [ 27.923406] ? __bread_gfp+0x2e0/0x2e0 [ 27.927266] ? add_to_page_cache_lru+0x136/0x2b0 [ 27.932116] ? add_to_page_cache_locked+0x40/0x40 [ 27.937067] ? alloc_pages_current+0x15d/0x260 [ 27.941628] do_read_cache_page+0x38e/0xc10 [ 27.945923] ? hfsplus_bmap+0x30/0x30 [ 27.949706] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.955129] hfsplus_block_free+0x177/0x560 [ 27.959422] hfsplus_free_extents+0x170/0x440 [ 27.963888] hfsplus_file_truncate+0xbc0/0xe80 [ 27.968451] ? hfsplus_delete_cat+0x10c/0xd70 [ 27.972917] ? hfsplus_get_block+0x820/0x820 [ 27.977314] hfsplus_delete_inode+0x160/0x1f0 [ 27.981779] hfsplus_unlink+0x48c/0x6b0 [ 27.985733] ? hfsplus_symlink+0x2a0/0x2a0 [ 27.989952] ? lock_acquire+0x170/0x3f0 [ 27.993915] ? lock_two_nondirectories+0xb2/0xf0 [ 27.998649] hfsplus_rename+0x9f/0x1d0 [ 28.002513] ? down_write_nested+0x36/0x90 [ 28.006739] vfs_rename+0x560/0x1820 [ 28.010433] ? path_openat+0x2970/0x2970 [ 28.014532] ? security_path_rename+0x13f/0x2a0 [ 28.019177] SyS_renameat2+0x95b/0xad0 [ 28.023043] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 28.028041] ? SyS_link+0x30/0x30 [ 28.031471] ? putname+0xcd/0x110 [ 28.034904] ? filp_open+0x60/0x60 [ 28.038418] ? do_syscall_64+0x4c/0x640 [ 28.042368] ? SyS_link+0x30/0x30 [ 28.045792] do_syscall_64+0x1d5/0x640 [ 28.049656] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 28.054818] RIP: 0033:0x7f665753ab89 [ 28.058522] RSP: 002b:00007fffdc0d9d28 EFLAGS: 00000246 ORIG_RAX: 000000000000013c [ 28.066210] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f665753ab89 [ 28.073539] RDX: 0000000000000005 RSI: 00000000200001c0 RDI: 0000000000000005 [ 28.080789] RBP: 00007f66574fa190 R08: 0000000000000000 R09: 0000000000000000 [ 28.088030] R10: 0000000020000200 R11: 0000000000000246 R12: 00007f66574fa220 [ 28.095274] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000