[ OK ] Started OpenBSD Secure Shell server. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.64' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 50.569246] [ 50.570889] ============================================ [ 50.576326] WARNING: possible recursive locking detected [ 50.581759] 4.14.301-syzkaller #0 Not tainted [ 50.586229] -------------------------------------------- [ 50.591648] syz-executor173/7971 is trying to acquire lock: [ 50.597360] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 50.607339] [ 50.607339] but task is already holding lock: [ 50.613457] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 50.623755] [ 50.623755] other info that might help us debug this: [ 50.630392] Possible unsafe locking scenario: [ 50.630392] [ 50.636425] CPU0 [ 50.638997] ---- [ 50.641549] lock(&HFSPLUS_I(inode)->extents_lock); [ 50.646621] lock(&HFSPLUS_I(inode)->extents_lock); [ 50.651695] [ 50.651695] *** DEADLOCK *** [ 50.651695] [ 50.657722] May be due to missing lock nesting notation [ 50.657722] [ 50.664626] 5 locks held by syz-executor173/7971: [ 50.669437] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 50.677821] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 50.687247] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 50.697971] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 50.707237] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 50.716508] [ 50.716508] stack backtrace: [ 50.720982] CPU: 1 PID: 7971 Comm: syz-executor173 Not tainted 4.14.301-syzkaller #0 [ 50.728833] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 50.738157] Call Trace: [ 50.740722] dump_stack+0x1b2/0x281 [ 50.744322] __lock_acquire.cold+0x180/0x97c [ 50.748705] ? register_lock_class+0x1d0/0x1180 [ 50.753346] ? trace_hardirqs_on+0x10/0x10 [ 50.757552] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 50.762886] ? save_trace+0xd6/0x290 [ 50.766569] ? __lock_acquire+0x2190/0x3f20 [ 50.770862] lock_acquire+0x170/0x3f0 [ 50.774636] ? hfsplus_get_block+0x1f9/0x820 [ 50.779019] ? hfsplus_get_block+0x1f9/0x820 [ 50.783395] __mutex_lock+0xc4/0x1310 [ 50.787166] ? hfsplus_get_block+0x1f9/0x820 [ 50.791545] ? hfsplus_get_block+0x1f9/0x820 [ 50.795926] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 50.801346] ? lock_acquire+0x170/0x3f0 [ 50.805292] ? create_page_buffers+0x14d/0x1c0 [ 50.809847] hfsplus_get_block+0x1f9/0x820 [ 50.814053] ? _raw_spin_unlock+0x29/0x40 [ 50.818172] ? create_page_buffers+0xce/0x1c0 [ 50.822640] block_read_full_page+0x25e/0x8d0 [ 50.827112] ? hfsplus_file_extend+0xef0/0xef0 [ 50.831694] ? __lru_cache_add+0x178/0x250 [ 50.835903] ? __bread_gfp+0x2e0/0x2e0 [ 50.839761] ? add_to_page_cache_lru+0x136/0x2b0 [ 50.844495] ? add_to_page_cache_locked+0x40/0x40 [ 50.849310] ? alloc_pages_current+0x15d/0x260 [ 50.853863] do_read_cache_page+0x38e/0xc10 [ 50.858156] ? hfsplus_bmap+0x30/0x30 [ 50.862074] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 50.867523] hfsplus_block_free+0x177/0x560 [ 50.871826] hfsplus_free_extents+0x170/0x440 [ 50.876295] hfsplus_file_truncate+0xbc0/0xe80 [ 50.880937] ? hfsplus_get_block+0x820/0x820 [ 50.885418] ? up_write+0x17/0x60 [ 50.888854] ? unmap_mapping_range+0xe9/0x250 [ 50.893409] ? inode_newsize_ok+0x145/0x1c0 [ 50.897709] hfsplus_setattr+0x182/0x310 [ 50.901753] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 50.906221] notify_change+0x56b/0xd10 [ 50.910081] do_truncate+0xff/0x1a0 [ 50.913679] ? finish_open+0x170/0x170 [ 50.917538] ? apparmor_path_truncate+0x163/0x1d0 [ 50.922361] path_openat+0x1dcc/0x2970 [ 50.926222] ? path_lookupat+0x780/0x780 [ 50.930255] ? trace_hardirqs_on+0x10/0x10 [ 50.934631] ? trace_hardirqs_on+0x10/0x10 [ 50.938835] do_filp_open+0x179/0x3c0 [ 50.942615] ? may_open_dev+0xe0/0xe0 [ 50.946390] ? lock_downgrade+0x740/0x740 [ 50.950511] ? do_raw_spin_unlock+0x164/0x220 [ 50.954977] ? _raw_spin_unlock+0x29/0x40 [ 50.959118] ? __alloc_fd+0x1be/0x490 [ 50.967759] ? _raw_spin_unlock_irq+0x24/0x80 [ 50.972225] do_sys_open+0x296/0x410 [ 50.975915] ? filp_open+0x60/0x60 [ 50.979432] ? do_syscall_64+0x4c/0x640 [ 50.983386] ? compat_SyS_openat+0x30/0x30 [ 50.987593] do_syscall_64+0x1d5/0x640 [ 50.991456] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 50.996617] RIP: 0033:0x7f2d9eecea79 [ 51.000298] RSP: 002b:00007ffcd62f4c88 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 51.008000] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2d9eecea79 [ 51.015251] RDX: 00007f2d9ee8ce63 RSI: 0000000000000000 RDI: 0000000020000080 [ 51.022489] RBP: 00007f2d9ee8e080 R08: 000000000000060a R09: 0000000000000000 [ 51.029753] R10: 00007ffcd62f4b50 R11: 0000000000000246 R12: 00007f2d9ee8e110 [ 51.037003] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000