Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.175' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.542032] hfsplus: xattr searching failed [ 32.546969] [ 32.548603] ============================================ [ 32.554035] WARNING: possible recursive locking detected [ 32.559458] 4.19.211-syzkaller #0 Not tainted [ 32.563925] -------------------------------------------- [ 32.569349] syz-executor143/8100 is trying to acquire lock: [ 32.575031] 00000000537ef710 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 32.584550] [ 32.584550] but task is already holding lock: [ 32.590512] 0000000004359af9 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.600464] [ 32.600464] other info that might help us debug this: [ 32.607102] Possible unsafe locking scenario: [ 32.607102] [ 32.613134] CPU0 [ 32.615688] ---- [ 32.618242] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.623317] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.628413] [ 32.628413] *** DEADLOCK *** [ 32.628413] [ 32.634448] May be due to missing lock nesting notation [ 32.634448] [ 32.641350] 4 locks held by syz-executor143/8100: [ 32.646172] #0: 00000000264de80a (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 32.654214] #1: 00000000d28a9c95 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 32.663315] #2: 0000000004359af9 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.673699] #3: 000000007893faa2 (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 32.682430] [ 32.682430] stack backtrace: [ 32.686907] CPU: 0 PID: 8100 Comm: syz-executor143 Not tainted 4.19.211-syzkaller #0 [ 32.694761] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.704088] Call Trace: [ 32.706659] dump_stack+0x1fc/0x2ef [ 32.710288] __lock_acquire.cold+0x121/0x57e [ 32.714676] ? mark_held_locks+0xf0/0xf0 [ 32.718740] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.724080] ? save_trace+0xd6/0x290 [ 32.727772] ? __lock_acquire+0x22f9/0x3ff0 [ 32.732073] lock_acquire+0x170/0x3c0 [ 32.735854] ? hfsplus_get_block+0x292/0x960 [ 32.740239] ? hfsplus_get_block+0x292/0x960 [ 32.744646] __mutex_lock+0xd7/0x1190 [ 32.748439] ? hfsplus_get_block+0x292/0x960 [ 32.752914] ? check_preemption_disabled+0x41/0x280 [ 32.757908] ? hfsplus_get_block+0x292/0x960 [ 32.762291] ? mutex_trylock+0x1a0/0x1a0 [ 32.766332] ? create_page_buffers+0x212/0x350 [ 32.770892] ? alloc_page_buffers+0x2da/0x5c0 [ 32.775367] ? lock_downgrade+0x720/0x720 [ 32.779489] ? do_raw_spin_lock+0xcb/0x220 [ 32.783703] hfsplus_get_block+0x292/0x960 [ 32.787918] block_read_full_page+0x288/0xd10 [ 32.792408] ? hfsplus_file_extend+0xf40/0xf40 [ 32.796968] ? __bread_gfp+0x300/0x300 [ 32.800834] ? add_to_page_cache_locked+0x40/0x40 [ 32.805654] do_read_cache_page+0x533/0x1170 [ 32.810039] ? hfsplus_bmap+0x30/0x30 [ 32.813815] hfsplus_block_free+0x18b/0x5d0 [ 32.818114] ? __mutex_unlock_slowpath+0xea/0x610 [ 32.823021] hfsplus_free_extents+0x228/0x520 [ 32.827495] hfsplus_file_truncate+0xd96/0x1040 [ 32.832144] ? hfsplus_get_block+0x960/0x960 [ 32.836529] ? up_write+0x18/0x150 [ 32.840045] ? unmap_mapping_pages+0x121/0x2b0 [ 32.844606] ? inode_newsize_ok+0x121/0x1e0 [ 32.848906] hfsplus_setattr+0x1e7/0x310 [ 32.852945] ? hfsplus_file_open+0x140/0x140 [ 32.857330] notify_change+0x70b/0xfc0 [ 32.861194] do_truncate+0x134/0x1f0 [ 32.864887] ? dentry_open+0x1d0/0x1d0 [ 32.868753] ? apparmor_path_truncate+0x183/0x200 [ 32.873575] ? inode_permission+0x3d/0x140 [ 32.877787] path_openat+0x2308/0x2df0 [ 32.881672] ? path_lookupat+0x8d0/0x8d0 [ 32.885712] ? mark_held_locks+0xf0/0xf0 [ 32.889749] ? __lock_acquire+0x6de/0x3ff0 [ 32.893962] do_filp_open+0x18c/0x3f0 [ 32.897738] ? may_open_dev+0xf0/0xf0 [ 32.901518] ? lock_downgrade+0x720/0x720 [ 32.905644] ? lock_acquire+0x170/0x3c0 [ 32.909594] ? __alloc_fd+0x34/0x570 [ 32.913283] ? do_raw_spin_unlock+0x171/0x230 [ 32.917755] ? _raw_spin_unlock+0x29/0x40 [ 32.921884] ? __alloc_fd+0x28d/0x570 [ 32.925665] do_sys_open+0x3b3/0x520 [ 32.929354] ? filp_open+0x70/0x70 [ 32.932873] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 32.938218] ? trace_hardirqs_off_caller+0x6e/0x210 [ 32.943212] ? do_syscall_64+0x21/0x620 [ 32.947164] do_syscall_64+0xf9/0x620 [ 32.950944] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 32.956127] RIP: 0033:0x7f87b2401779 [ 32.959819] 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.978698] RSP: 002b:00007ffded169d68 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 32.986380] RAX: ffffffffffffffda RBX: 0032656c69662f2e RCX: 00007f87b2401779 [ 32