Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.225' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.633805] hfsplus: xattr searching failed [ 27.638496] audit: type=1800 audit(1672088251.226:2): pid=7979 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor282" name="file1" dev="loop0" ino=20 res=0 [ 27.638600] hfsplus: xattr searching failed [ 27.662234] [ 27.663857] ============================================ [ 27.669288] WARNING: possible recursive locking detected [ 27.674729] 4.14.302-syzkaller #0 Not tainted [ 27.679201] -------------------------------------------- [ 27.684634] syz-executor282/7979 is trying to acquire lock: [ 27.690316] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 27.700270] [ 27.700270] but task is already holding lock: [ 27.706236] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.716526] [ 27.716526] other info that might help us debug this: [ 27.723165] Possible unsafe locking scenario: [ 27.723165] [ 27.729202] CPU0 [ 27.731763] ---- [ 27.734335] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.739428] lock(&HFSPLUS_I(inode)->extents_lock); [ 27.744504] [ 27.744504] *** DEADLOCK *** [ 27.744504] [ 27.750551] May be due to missing lock nesting notation [ 27.750551] [ 27.757450] 5 locks held by syz-executor282/7979: [ 27.762262] #0: (sb_writers#10){.+.+}, at: [] do_sys_ftruncate.constprop.0+0x1fb/0x480 [ 27.772039] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 27.781460] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 27.792190] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 27.801445] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 27.810615] [ 27.810615] stack backtrace: [ 27.815086] CPU: 1 PID: 7979 Comm: syz-executor282 Not tainted 4.14.302-syzkaller #0 [ 27.822935] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 27.832259] Call Trace: [ 27.834822] dump_stack+0x1b2/0x281 [ 27.838424] __lock_acquire.cold+0x180/0x97c [ 27.842807] ? register_lock_class+0x1d0/0x1180 [ 27.847447] ? trace_hardirqs_on+0x10/0x10 [ 27.851654] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 27.856989] ? save_trace+0xd6/0x290 [ 27.860674] ? __lock_acquire+0x2190/0x3f20 [ 27.864967] lock_acquire+0x170/0x3f0 [ 27.868741] ? hfsplus_get_block+0x1f9/0x820 [ 27.873123] ? hfsplus_get_block+0x1f9/0x820 [ 27.877502] __mutex_lock+0xc4/0x1310 [ 27.881301] ? hfsplus_get_block+0x1f9/0x820 [ 27.885688] ? hfsplus_get_block+0x1f9/0x820 [ 27.890068] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.895491] ? lock_acquire+0x170/0x3f0 [ 27.899440] ? create_page_buffers+0x14d/0x1c0 [ 27.903994] hfsplus_get_block+0x1f9/0x820 [ 27.908220] ? _raw_spin_unlock+0x29/0x40 [ 27.912345] ? create_page_buffers+0xce/0x1c0 [ 27.916813] block_read_full_page+0x25e/0x8d0 [ 27.921453] ? hfsplus_file_extend+0xef0/0xef0 [ 27.926007] ? __lru_cache_add+0x178/0x250 [ 27.930216] ? __bread_gfp+0x2e0/0x2e0 [ 27.934167] ? add_to_page_cache_lru+0x136/0x2b0 [ 27.938894] ? add_to_page_cache_locked+0x40/0x40 [ 27.943707] ? alloc_pages_current+0x15d/0x260 [ 27.948261] do_read_cache_page+0x38e/0xc10 [ 27.952556] ? hfsplus_bmap+0x30/0x30 [ 27.956330] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.961753] hfsplus_block_free+0x177/0x560 [ 27.966160] hfsplus_free_extents+0x170/0x440 [ 27.970628] hfsplus_file_truncate+0xbc0/0xe80 [ 27.975182] ? hfsplus_get_block+0x820/0x820 [ 27.979561] ? up_write+0x17/0x60 [ 27.982986] ? unmap_mapping_range+0xe9/0x250 [ 27.987451] ? inode_newsize_ok+0x145/0x1c0 [ 27.991746] hfsplus_setattr+0x182/0x310 [ 27.995797] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 28.000263] notify_change+0x56b/0xd10 [ 28.004124] do_truncate+0xff/0x1a0 [ 28.007723] ? finish_open+0x170/0x170 [ 28.011610] ? apparmor_path_truncate+0x163/0x1d0 [ 28.016436] do_sys_ftruncate.constprop.0+0x3a3/0x480 [ 28.021598] ? compat_SyS_truncate+0x40/0x40 [ 28.025982] do_syscall_64+0x1d5/0x640 [ 28.029845] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 28.035006] RIP: 0033:0x7f9afaa247b9 [ 28.038696] RSP: 002b:00007ffd10abf478 EFLAGS: 00000246 ORIG_RAX: 000000000000004d [ 28.046376] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9afaa247b9 [ 28.053618] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 28.060862] RBP: 00007f9afa9e4050 R08: 0000000000000000 R09: 0000000000000000 [ 28.068103] R10: 00000000000005e1 R11: 0000000000000246 R12: 00007f9afa9e40e0 [ 28.075344] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000