Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.183' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.553580] hfsplus: xattr searching failed [ 32.558661] hfsplus: xattr searching failed [ 32.564646] [ 32.566265] ============================================ [ 32.571689] WARNING: possible recursive locking detected [ 32.577118] 4.19.211-syzkaller #0 Not tainted [ 32.581607] -------------------------------------------- [ 32.587032] syz-executor392/8083 is trying to acquire lock: [ 32.592714] 0000000073d5f7bf (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 32.602237] [ 32.602237] but task is already holding lock: [ 32.608189] 00000000bd22374e (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.618164] [ 32.618164] other info that might help us debug this: [ 32.624807] Possible unsafe locking scenario: [ 32.624807] [ 32.630839] CPU0 [ 32.633395] ---- [ 32.635956] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.641036] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.646117] [ 32.646117] *** DEADLOCK *** [ 32.646117] [ 32.652153] May be due to missing lock nesting notation [ 32.652153] [ 32.659122] 4 locks held by syz-executor392/8083: [ 32.663935] #0: 00000000fa0b1193 (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 32.671897] #1: 00000000a099e9ba (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 32.680979] #2: 00000000bd22374e (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.691364] #3: 00000000f876dc71 (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 32.700093] [ 32.700093] stack backtrace: [ 32.704677] CPU: 0 PID: 8083 Comm: syz-executor392 Not tainted 4.19.211-syzkaller #0 [ 32.712536] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.721869] Call Trace: [ 32.724447] dump_stack+0x1fc/0x2ef [ 32.728055] __lock_acquire.cold+0x121/0x57e [ 32.732466] ? mark_held_locks+0xf0/0xf0 [ 32.736507] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.741845] ? save_trace+0xd6/0x290 [ 32.745537] ? __lock_acquire+0x22f9/0x3ff0 [ 32.749840] lock_acquire+0x170/0x3c0 [ 32.753620] ? hfsplus_get_block+0x292/0x960 [ 32.758095] ? hfsplus_get_block+0x292/0x960 [ 32.762479] __mutex_lock+0xd7/0x1190 [ 32.766262] ? hfsplus_get_block+0x292/0x960 [ 32.770652] ? check_preemption_disabled+0x41/0x280 [ 32.775663] ? hfsplus_get_block+0x292/0x960 [ 32.780052] ? mutex_trylock+0x1a0/0x1a0 [ 32.784096] ? create_page_buffers+0x212/0x350 [ 32.788656] ? alloc_page_buffers+0x2da/0x5c0 [ 32.793133] ? lock_downgrade+0x720/0x720 [ 32.797264] ? do_raw_spin_lock+0xcb/0x220 [ 32.801478] hfsplus_get_block+0x292/0x960 [ 32.805697] block_read_full_page+0x288/0xd10 [ 32.810171] ? hfsplus_file_extend+0xf40/0xf40 [ 32.814730] ? __bread_gfp+0x300/0x300 [ 32.818596] ? add_to_page_cache_locked+0x40/0x40 [ 32.823416] do_read_cache_page+0x533/0x1170 [ 32.827801] ? hfsplus_bmap+0x30/0x30 [ 32.831579] hfsplus_block_free+0x18b/0x5d0 [ 32.835878] ? __mutex_unlock_slowpath+0xea/0x610 [ 32.840697] hfsplus_free_extents+0x228/0x520 [ 32.845191] hfsplus_file_truncate+0xd96/0x1040 [ 32.849838] ? hfsplus_get_block+0x960/0x960 [ 32.854223] ? up_write+0x18/0x150 [ 32.857743] ? unmap_mapping_pages+0x121/0x2b0 [ 32.862304] ? inode_newsize_ok+0x121/0x1e0 [ 32.866603] hfsplus_setattr+0x1e7/0x310 [ 32.870644] ? hfsplus_file_open+0x140/0x140 [ 32.875029] notify_change+0x70b/0xfc0 [ 32.878898] do_truncate+0x134/0x1f0 [ 32.882589] ? dentry_open+0x1d0/0x1d0 [ 32.886457] ? apparmor_path_truncate+0x183/0x200 [ 32.891278] ? inode_owner_or_capable+0x17a/0x1e0 [ 32.896098] path_openat+0x2308/0x2df0 [ 32.899971] ? path_lookupat+0x8d0/0x8d0 [ 32.904015] ? mark_held_locks+0xf0/0xf0 [ 32.908053] ? __lock_acquire+0x6de/0x3ff0 [ 32.912265] do_filp_open+0x18c/0x3f0 [ 32.916040] ? may_open_dev+0xf0/0xf0 [ 32.919818] ? lock_downgrade+0x720/0x720 [ 32.923944] ? lock_acquire+0x170/0x3c0 [ 32.927899] ? __alloc_fd+0x34/0x570 [ 32.931589] ? do_raw_spin_unlock+0x171/0x230 [ 32.936071] ? _raw_spin_unlock+0x29/0x40 [ 32.940199] ? __alloc_fd+0x28d/0x570 [ 32.943990] do_sys_open+0x3b3/0x520 [ 32.947681] ? filp_open+0x70/0x70 [ 32.951198] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.956567] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.961562] ? do_syscall_64+0x21/0x620 [ 32.965512] do_syscall_64+0xf9/0x620 [ 32.969292] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.974460] RIP: 0033:0x7f37f4a4f789 [ 32.978157] 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 [ 32.997054] RSP: 002b:00007fff0a5df0a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 33.004749] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f37f4a4f789 [ 33.012005] RDX: 0000000000000000 RSI: 0000000000143242 RDI: 0000000020000000 [ 33.019256] RBP: 00007f37f4a0f020 R08: 00000000000005e1 R09: 0000000000000000 [ 33.026503] R10: 00007fff0a5def70 R11: 0000000000000246 R12: 00007f37f4a0f0b0 [ 33.033748] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 33.050759] hfsplus: unable to mark blocks free: error