Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.139' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.517979] [ 33.519629] ============================================ [ 33.525073] WARNING: possible recursive locking detected [ 33.530514] 4.19.211-syzkaller #0 Not tainted [ 33.535057] -------------------------------------------- [ 33.540668] syz-executor409/8101 is trying to acquire lock: [ 33.546363] 00000000a3a8557b (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 33.555889] [ 33.555889] but task is already holding lock: [ 33.561849] 000000002cbd165c (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 33.571808] [ 33.571808] other info that might help us debug this: [ 33.578452] Possible unsafe locking scenario: [ 33.578452] [ 33.584495] CPU0 [ 33.587064] ---- [ 33.589625] lock(&HFSPLUS_I(inode)->extents_lock); [ 33.594736] lock(&HFSPLUS_I(inode)->extents_lock); [ 33.599818] [ 33.599818] *** DEADLOCK *** [ 33.599818] [ 33.605856] May be due to missing lock nesting notation [ 33.605856] [ 33.612767] 4 locks held by syz-executor409/8101: [ 33.617593] #0: 000000004db4aa54 (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 33.625559] #1: 000000006c87da06 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 33.634647] #2: 000000002cbd165c (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 33.645036] #3: 00000000e9cb5dce (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 33.653859] [ 33.653859] stack backtrace: [ 33.658335] CPU: 1 PID: 8101 Comm: syz-executor409 Not tainted 4.19.211-syzkaller #0 [ 33.666277] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 33.675617] Call Trace: [ 33.678194] dump_stack+0x1fc/0x2ef [ 33.681804] __lock_acquire.cold+0x121/0x57e [ 33.686213] ? mark_held_locks+0xf0/0xf0 [ 33.690260] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 33.695602] ? save_trace+0xd6/0x290 [ 33.699293] ? __lock_acquire+0x22f9/0x3ff0 [ 33.703596] lock_acquire+0x170/0x3c0 [ 33.707382] ? hfsplus_get_block+0x292/0x960 [ 33.711846] ? hfsplus_get_block+0x292/0x960 [ 33.716256] __mutex_lock+0xd7/0x1190 [ 33.720058] ? hfsplus_get_block+0x292/0x960 [ 33.724456] ? check_preemption_disabled+0x41/0x280 [ 33.729464] ? hfsplus_get_block+0x292/0x960 [ 33.733950] ? mutex_trylock+0x1a0/0x1a0 [ 33.737996] ? create_page_buffers+0x212/0x350 [ 33.742560] ? alloc_page_buffers+0x2da/0x5c0 [ 33.747155] ? lock_downgrade+0x720/0x720 [ 33.751289] ? do_raw_spin_lock+0xcb/0x220 [ 33.755597] hfsplus_get_block+0x292/0x960 [ 33.759819] block_read_full_page+0x288/0xd10 [ 33.764307] ? hfsplus_file_extend+0xf40/0xf40 [ 33.768924] ? __bread_gfp+0x300/0x300 [ 33.772793] ? add_to_page_cache_lru+0x259/0x680 [ 33.777528] ? add_to_page_cache_locked+0x40/0x40 [ 33.782352] do_read_cache_page+0x533/0x1170 [ 33.786750] ? hfsplus_bmap+0x30/0x30 [ 33.790527] hfsplus_block_free+0x18b/0x5d0 [ 33.794825] ? __mutex_unlock_slowpath+0xea/0x610 [ 33.799647] hfsplus_free_extents+0x228/0x520 [ 33.804120] hfsplus_file_truncate+0xd96/0x1040 [ 33.808776] ? hfsplus_get_block+0x960/0x960 [ 33.813162] ? up_write+0x18/0x150 [ 33.816701] ? unmap_mapping_pages+0x121/0x2b0 [ 33.821265] ? inode_newsize_ok+0x121/0x1e0 [ 33.825568] hfsplus_setattr+0x1e7/0x310 [ 33.829609] ? hfsplus_file_open+0x140/0x140 [ 33.833995] notify_change+0x70b/0xfc0 [ 33.837860] do_truncate+0x134/0x1f0 [ 33.841550] ? dentry_open+0x1d0/0x1d0 [ 33.845414] ? apparmor_path_truncate+0x183/0x200 [ 33.850321] ? inode_permission+0x3d/0x140 [ 33.855195] path_openat+0x2308/0x2df0 [ 33.859074] ? path_lookupat+0x8d0/0x8d0 [ 33.863116] ? mark_held_locks+0xf0/0xf0 [ 33.867159] ? __lock_acquire+0x6de/0x3ff0 [ 33.871381] do_filp_open+0x18c/0x3f0 [ 33.875162] ? may_open_dev+0xf0/0xf0 [ 33.878957] ? lock_downgrade+0x720/0x720 [ 33.883092] ? lock_acquire+0x170/0x3c0 [ 33.887044] ? __alloc_fd+0x34/0x570 [ 33.890737] ? do_raw_spin_unlock+0x171/0x230 [ 33.895221] ? _raw_spin_unlock+0x29/0x40 [ 33.899356] ? __alloc_fd+0x28d/0x570 [ 33.903137] do_sys_open+0x3b3/0x520 [ 33.906839] ? filp_open+0x70/0x70 [ 33.910368] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.915883] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.920891] ? do_syscall_64+0x21/0x620 [ 33.924847] do_syscall_64+0xf9/0x620 [ 33.928637] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.933812] RIP: 0033:0x7f464d82b789 [ 33.937505] 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.956382] RSP: 002b:00007fff359a5678 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 33.964069] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000