Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.252' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.064713] hfsplus: xattr searching failed [ 33.069798] [ 33.071420] ============================================ [ 33.076842] WARNING: possible recursive locking detected [ 33.082269] 4.19.211-syzkaller #0 Not tainted [ 33.086736] -------------------------------------------- [ 33.092174] syz-executor785/8101 is trying to acquire lock: [ 33.097866] 0000000005b25dee (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 33.107397] [ 33.107397] but task is already holding lock: [ 33.113347] 000000000cea4db7 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 33.123300] [ 33.123300] other info that might help us debug this: [ 33.129938] Possible unsafe locking scenario: [ 33.129938] [ 33.135969] CPU0 [ 33.138526] ---- [ 33.141082] lock(&HFSPLUS_I(inode)->extents_lock); [ 33.146160] lock(&HFSPLUS_I(inode)->extents_lock); [ 33.151236] [ 33.151236] *** DEADLOCK *** [ 33.151236] [ 33.157270] May be due to missing lock nesting notation [ 33.157270] [ 33.164175] 4 locks held by syz-executor785/8101: [ 33.168988] #0: 000000003e03ecdc (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 33.176956] #1: 00000000e576fbb7 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 33.186033] #2: 000000000cea4db7 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 33.196419] #3: 000000008ca4eb45 (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 33.205165] [ 33.205165] stack backtrace: [ 33.209658] CPU: 1 PID: 8101 Comm: syz-executor785 Not tainted 4.19.211-syzkaller #0 [ 33.217518] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 33.226850] Call Trace: [ 33.229421] dump_stack+0x1fc/0x2ef [ 33.233035] __lock_acquire.cold+0x121/0x57e [ 33.237427] ? mark_held_locks+0xf0/0xf0 [ 33.241468] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 33.246808] ? save_trace+0xd6/0x290 [ 33.250502] ? __lock_acquire+0x22f9/0x3ff0 [ 33.254817] lock_acquire+0x170/0x3c0 [ 33.258600] ? hfsplus_get_block+0x292/0x960 [ 33.262987] ? hfsplus_get_block+0x292/0x960 [ 33.267370] __mutex_lock+0xd7/0x1190 [ 33.271147] ? hfsplus_get_block+0x292/0x960 [ 33.275535] ? check_preemption_disabled+0x41/0x280 [ 33.280530] ? hfsplus_get_block+0x292/0x960 [ 33.284916] ? mutex_trylock+0x1a0/0x1a0 [ 33.288972] ? create_page_buffers+0x212/0x350 [ 33.293538] ? alloc_page_buffers+0x2da/0x5c0 [ 33.298042] ? lock_downgrade+0x720/0x720 [ 33.302171] ? do_raw_spin_lock+0xcb/0x220 [ 33.306387] hfsplus_get_block+0x292/0x960 [ 33.310609] block_read_full_page+0x288/0xd10 [ 33.315087] ? hfsplus_file_extend+0xf40/0xf40 [ 33.319651] ? __bread_gfp+0x300/0x300 [ 33.323521] ? add_to_page_cache_locked+0x40/0x40 [ 33.328352] do_read_cache_page+0x533/0x1170 [ 33.332760] ? hfsplus_bmap+0x30/0x30 [ 33.336545] hfsplus_block_free+0x18b/0x5d0 [ 33.340853] ? __mutex_unlock_slowpath+0xea/0x610 [ 33.345681] hfsplus_free_extents+0x228/0x520 [ 33.350156] hfsplus_file_truncate+0xd96/0x1040 [ 33.354893] ? hfsplus_get_block+0x960/0x960 [ 33.359279] ? up_write+0x18/0x150 [ 33.362794] ? unmap_mapping_pages+0x121/0x2b0 [ 33.367352] ? inode_newsize_ok+0x121/0x1e0 [ 33.371655] hfsplus_setattr+0x1e7/0x310 [ 33.375693] ? hfsplus_file_open+0x140/0x140 [ 33.380076] notify_change+0x70b/0xfc0 [ 33.383939] do_truncate+0x134/0x1f0 [ 33.387628] ? dentry_open+0x1d0/0x1d0 [ 33.391494] ? apparmor_path_truncate+0x183/0x200 [ 33.396315] ? inode_permission+0x3d/0x140 [ 33.400532] path_openat+0x2308/0x2df0 [ 33.404401] ? path_lookupat+0x8d0/0x8d0 [ 33.408438] ? mark_held_locks+0xf0/0xf0 [ 33.412476] ? __lock_acquire+0x6de/0x3ff0 [ 33.416686] do_filp_open+0x18c/0x3f0 [ 33.420462] ? may_open_dev+0xf0/0xf0 [ 33.424269] ? lock_downgrade+0x720/0x720 [ 33.428397] ? lock_acquire+0x170/0x3c0 [ 33.432355] ? __alloc_fd+0x34/0x570 [ 33.436050] ? do_raw_spin_unlock+0x171/0x230 [ 33.440526] ? _raw_spin_unlock+0x29/0x40 [ 33.444664] ? __alloc_fd+0x28d/0x570 [ 33.448447] do_sys_open+0x3b3/0x520 [ 33.452136] ? filp_open+0x70/0x70 [ 33.455656] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.460997] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.466014] ? do_syscall_64+0x21/0x620 [ 33.469965] do_syscall_64+0xf9/0x620 [ 33.473746] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.479003] RIP: 0033:0x7f65acd62779 [ 33.482695] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 14 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 33.501658] RSP: 002b:00007ffd07b14d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 33.509353] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007f65acd62779 [