Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.99' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 32.022193] hfsplus: xattr searching failed [ 32.026929] [ 32.028583] ============================================ [ 32.034022] WARNING: possible recursive locking detected [ 32.039461] 4.14.301-syzkaller #0 Not tainted [ 32.043942] -------------------------------------------- [ 32.049565] syz-executor213/8000 is trying to acquire lock: [ 32.055251] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_get_block+0x1f9/0x820 [ 32.065206] [ 32.065206] but task is already holding lock: [ 32.071156] (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 32.081456] [ 32.081456] other info that might help us debug this: [ 32.088102] Possible unsafe locking scenario: [ 32.088102] [ 32.094143] CPU0 [ 32.096702] ---- [ 32.099262] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.104345] lock(&HFSPLUS_I(inode)->extents_lock); [ 32.109431] [ 32.109431] *** DEADLOCK *** [ 32.109431] [ 32.115477] May be due to missing lock nesting notation [ 32.115477] [ 32.122390] 5 locks held by syz-executor213/8000: [ 32.127214] #0: (sb_writers#10){.+.+}, at: [] mnt_want_write+0x3a/0xb0 [ 32.135732] #1: (&sb->s_type->i_mutex_key#17){+.+.}, at: [] do_truncate+0xf0/0x1a0 [ 32.145173] #2: (&HFSPLUS_I(inode)->extents_lock){+.+.}, at: [] hfsplus_file_truncate+0x1ba/0xe80 [ 32.155932] #3: (&tree->tree_lock/1){+.+.}, at: [] hfsplus_find_init+0x161/0x220 [ 32.165199] #4: (&sbi->alloc_mutex){+.+.}, at: [] hfsplus_block_free+0xc7/0x560 [ 32.174368] [ 32.174368] stack backtrace: [ 32.178853] CPU: 1 PID: 8000 Comm: syz-executor213 Not tainted 4.14.301-syzkaller #0 [ 32.186711] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 32.196042] Call Trace: [ 32.198703] dump_stack+0x1b2/0x281 [ 32.202314] __lock_acquire.cold+0x180/0x97c [ 32.206793] ? register_lock_class+0x1d0/0x1180 [ 32.211444] ? trace_hardirqs_on+0x10/0x10 [ 32.215662] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 32.221006] ? save_trace+0xd6/0x290 [ 32.224702] ? __lock_acquire+0x2190/0x3f20 [ 32.229005] lock_acquire+0x170/0x3f0 [ 32.232800] ? hfsplus_get_block+0x1f9/0x820 [ 32.237190] ? hfsplus_get_block+0x1f9/0x820 [ 32.241580] __mutex_lock+0xc4/0x1310 [ 32.245364] ? hfsplus_get_block+0x1f9/0x820 [ 32.249755] ? hfsplus_get_block+0x1f9/0x820 [ 32.254146] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 32.259579] ? lock_acquire+0x170/0x3f0 [ 32.263533] ? create_page_buffers+0x14d/0x1c0 [ 32.268112] hfsplus_get_block+0x1f9/0x820 [ 32.272330] ? _raw_spin_unlock+0x29/0x40 [ 32.276458] ? create_page_buffers+0xce/0x1c0 [ 32.280934] block_read_full_page+0x25e/0x8d0 [ 32.285413] ? hfsplus_file_extend+0xef0/0xef0 [ 32.289979] ? __lru_cache_add+0x178/0x250 [ 32.294195] ? __bread_gfp+0x2e0/0x2e0 [ 32.298064] ? add_to_page_cache_lru+0x136/0x2b0 [ 32.302800] ? add_to_page_cache_locked+0x40/0x40 [ 32.307624] ? alloc_pages_current+0x15d/0x260 [ 32.312189] do_read_cache_page+0x38e/0xc10 [ 32.316490] ? hfsplus_bmap+0x30/0x30 [ 32.320275] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 32.325723] hfsplus_block_free+0x177/0x560 [ 32.330030] hfsplus_free_extents+0x170/0x440 [ 32.334509] hfsplus_file_truncate+0xbc0/0xe80 [ 32.339094] ? hfsplus_get_block+0x820/0x820 [ 32.343484] ? up_write+0x17/0x60 [ 32.346926] ? unmap_mapping_range+0xe9/0x250 [ 32.351406] ? inode_newsize_ok+0x145/0x1c0 [ 32.355726] hfsplus_setattr+0x182/0x310 [ 32.359769] ? hfsplus_file_fsync+0x4a0/0x4a0 [ 32.364244] notify_change+0x56b/0xd10 [ 32.368117] do_truncate+0xff/0x1a0 [ 32.371726] ? finish_open+0x170/0x170 [ 32.375597] ? apparmor_path_truncate+0x163/0x1d0 [ 32.380444] path_openat+0x1dcc/0x2970 [ 32.384317] ? path_lookupat+0x780/0x780 [ 32.388361] ? trace_hardirqs_on+0x10/0x10 [ 32.392582] ? trace_hardirqs_on+0x10/0x10 [ 32.396812] do_filp_open+0x179/0x3c0 [ 32.400596] ? may_open_dev+0xe0/0xe0 [ 32.404382] ? lock_downgrade+0x740/0x740 [ 32.408511] ? do_raw_spin_unlock+0x164/0x220 [ 32.412986] ? _raw_spin_unlock+0x29/0x40 [ 32.417126] ? __alloc_fd+0x1be/0x490 [ 32.420909] ? _raw_spin_unlock_irq+0x24/0x80 [ 32.425385] do_sys_open+0x296/0x410 [ 32.429078] ? filp_open+0x60/0x60 [ 32.432601] ? do_syscall_64+0x4c/0x640 [ 32.436557] ? compat_SyS_openat+0x30/0x30 [ 32.440773] do_syscall_64+0x1d5/0x640 [ 32.444645] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 32.449824] RIP: 0033:0x7fbb20cc5779 [ 32.453544] RSP: 002b:00007ffee9d9fc88 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 32.461254] RAX: ffffffffffffffda RBX: 0031656c69662f2e RCX: 00007fbb20cc5779 [ 32.468507] RDX: 00007fbb20c83df3 RSI: 0000000000000000 RDI: 0000000020000000 [ 32.475834] RBP: 00007fbb20c85010 R08: 00000000000005cd R09: 0000000000000000 [ 32.483110] R10: 00007ffee9d9fb50 R11: 0000000000000246 R12: 00007fbb20c850a0 [ 32.490366] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000