Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.20' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.740920] [ 32.742561] ============================================ [ 32.747989] WARNING: possible recursive locking detected [ 32.753425] 4.19.211-syzkaller #0 Not tainted [ 32.757905] -------------------------------------------- [ 32.763341] syz-executor336/8106 is trying to acquire lock: [ 32.769030] 0000000091abe974 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_get_block+0x292/0x960 [ 32.778553] [ 32.778553] but task is already holding lock: [ 32.784506] 00000000ef2f15e5 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.794459] [ 32.794459] other info that might help us debug this: [ 32.801104] Possible unsafe locking scenario: [ 32.801104] [ 32.807137] CPU0 [ 32.809696] ---- [ 32.812254] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.817338] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.822429] [ 32.822429] *** DEADLOCK *** [ 32.822429] [ 32.828475] May be due to missing lock nesting notation [ 32.828475] [ 32.835387] 4 locks held by syz-executor336/8106: [ 32.840297] #0: 00000000238e41c9 (sb_writers#11){.+.+}, at: mnt_want_write+0x3a/0xb0 [ 32.848286] #1: 000000001ada3c92 (&sb->s_type->i_mutex_key#17){+.+.}, at: do_truncate+0x125/0x1f0 [ 32.857367] #2: 00000000ef2f15e5 (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: hfsplus_file_truncate+0x1e2/0x1040 [ 32.867751] #3: 000000004c9bcffc (&sbi->alloc_mutex){+.+.}, at: hfsplus_block_free+0xdb/0x5d0 [ 32.876482] [ 32.876482] stack backtrace: [ 32.880959] CPU: 0 PID: 8106 Comm: syz-executor336 Not tainted 4.19.211-syzkaller #0 [ 32.888816] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.898185] Call Trace: [ 32.900757] dump_stack+0x1fc/0x2ef [ 32.904458] __lock_acquire.cold+0x121/0x57e [ 32.908845] ? mark_held_locks+0xf0/0xf0 [ 32.912900] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.918251] ? save_trace+0xd6/0x290 [ 32.921951] ? __lock_acquire+0x22f9/0x3ff0 [ 32.926254] lock_acquire+0x170/0x3c0 [ 32.930036] ? hfsplus_get_block+0x292/0x960 [ 32.934424] ? hfsplus_get_block+0x292/0x960 [ 32.938810] __mutex_lock+0xd7/0x1190 [ 32.942763] ? hfsplus_get_block+0x292/0x960 [ 32.947151] ? check_preemption_disabled+0x41/0x280 [ 32.952149] ? hfsplus_get_block+0x292/0x960 [ 32.956534] ? mutex_trylock+0x1a0/0x1a0 [ 32.960574] ? create_page_buffers+0x212/0x350 [ 32.965133] ? alloc_page_buffers+0x2da/0x5c0 [ 32.969606] ? lock_downgrade+0x720/0x720 [ 32.973731] ? do_raw_spin_lock+0xcb/0x220 [ 32.977943] hfsplus_get_block+0x292/0x960 [ 32.982157] block_read_full_page+0x288/0xd10 [ 32.986633] ? hfsplus_file_extend+0xf40/0xf40 [ 32.991191] ? __bread_gfp+0x300/0x300 [ 32.995058] ? add_to_page_cache_locked+0x40/0x40 [ 32.999882] do_read_cache_page+0x533/0x1170 [ 33.004273] ? hfsplus_bmap+0x30/0x30 [ 33.008052] hfsplus_block_free+0x18b/0x5d0 [ 33.012446] ? __mutex_unlock_slowpath+0xea/0x610 [ 33.017268] hfsplus_free_extents+0x228/0x520 [ 33.021742] hfsplus_file_truncate+0xd96/0x1040 [ 33.026390] ? hfsplus_get_block+0x960/0x960 [ 33.030778] ? up_write+0x18/0x150 [ 33.034295] ? unmap_mapping_pages+0x121/0x2b0 [ 33.038856] ? inode_newsize_ok+0x121/0x1e0 [ 33.043158] hfsplus_setattr+0x1e7/0x310 [ 33.047200] ? hfsplus_file_open+0x140/0x140 [ 33.051586] notify_change+0x70b/0xfc0 [ 33.055452] do_truncate+0x134/0x1f0 [ 33.059144] ? dentry_open+0x1d0/0x1d0 [ 33.063012] ? apparmor_path_truncate+0x183/0x200 [ 33.067834] ? inode_permission+0x3d/0x140 [ 33.072047] path_openat+0x2308/0x2df0 [ 33.075916] ? path_lookupat+0x8d0/0x8d0 [ 33.079958] ? mark_held_locks+0xf0/0xf0 [ 33.083999] ? __lock_acquire+0x6de/0x3ff0 [ 33.088210] do_filp_open+0x18c/0x3f0 [ 33.092004] ? may_open_dev+0xf0/0xf0 [ 33.095784] ? lock_downgrade+0x720/0x720 [ 33.099909] ? lock_acquire+0x170/0x3c0 [ 33.103858] ? __alloc_fd+0x34/0x570 [ 33.107553] ? do_raw_spin_unlock+0x171/0x230 [ 33.112027] ? _raw_spin_unlock+0x29/0x40 [ 33.116167] ? __alloc_fd+0x28d/0x570 [ 33.119955] do_sys_open+0x3b3/0x520 [ 33.123652] ? filp_open+0x70/0x70 [ 33.127179] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 33.132523] ? trace_hardirqs_off_caller+0x6e/0x210 [ 33.137519] ? do_syscall_64+0x21/0x620 [ 33.141471] do_syscall_64+0xf9/0x620 [ 33.145251] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.150418] RIP: 0033:0x7fb2a5ec2a79 [ 33.154111] 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.173010] RSP: 002b:00007ffe7fa23538 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 33.181047] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb2a5ec2a79 [ 33.188294] RDX: 00007fb2a5e80e63 RSI: 0000000000000000 RDI: 0000000020000080 [ 33.195541] RBP: 00007fb2a5e82080 R08: 000000000000060a R09: 0000000000000000 [ 33.202874] R10: 00007ffe7fa23400 R11: 0000000000000246 R12: 00007fb2a5e82110 [ 33.210119] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 33.228922] hfsplus: request for non-existent node 31668 in B*Tree [ 33.235257] hfsplus: request for non-existent node 31668 in B*Tree [