./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor974061658 <...> Warning: Permanently added '10.128.1.163' (ECDSA) to the list of known hosts. execve("./syz-executor974061658", ["./syz-executor974061658"], 0x7fffb1fc5960 /* 10 vars */) = 0 brk(NULL) = 0x555555ace000 brk(0x555555acec40) = 0x555555acec40 arch_prctl(ARCH_SET_FS, 0x555555ace300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor974061658", 4096) = 27 brk(0x555555aefc40) = 0x555555aefc40 brk(0x555555af0000) = 0x555555af0000 mprotect(0x7fcafe161000, 16384, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcaf5ca8000 write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 524288) = 524288 munmap(0x7fcaf5ca8000, 524288) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./bus", 0777) = 0 mount("/dev/loop0", "./bus", "hfsplus", MS_SYNCHRONOUS|MS_NOATIME|MS_POSIXACL, "") = 0 openat(AT_FDCWD, "./bus", O_RDONLY|O_DIRECTORY) = 3 chdir("./bus") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 openat(AT_FDCWD, "./bus", O_RDWR|O_CREAT|O_NONBLOCK|O_SYNC|O_NOATIME, 000) = 4 syzkaller login: [ 44.836279][ T4995] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=4995 'syz-executor974' [ 44.853908][ T4995] loop0: detected capacity change from 0 to 1024 [ 44.886829][ T4995] [ 44.889197][ T4995] ============================================ [ 44.895335][ T4995] WARNING: possible recursive locking detected [ 44.901461][ T4995] 6.4.0-syzkaller-10098-g995b406c7e97 #0 Not tainted [ 44.908129][ T4995] -------------------------------------------- [ 44.914250][ T4995] syz-executor974/4995 is trying to acquire lock: [ 44.920651][ T4995] ffff88807e7ec0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x174/0x230 [ 44.930306][ T4995] [ 44.930306][ T4995] but task is already holding lock: [ 44.937650][ T4995] ffff88807e7ec0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x174/0x230 [ 44.947279][ T4995] [ 44.947279][ T4995] other info that might help us debug this: [ 44.955309][ T4995] Possible unsafe locking scenario: [ 44.955309][ T4995] [ 44.962732][ T4995] CPU0 [ 44.966072][ T4995] ---- [ 44.969326][ T4995] lock(&tree->tree_lock/1); [ 44.974090][ T4995] lock(&tree->tree_lock/1); [ 44.978744][ T4995] [ 44.978744][ T4995] *** DEADLOCK *** [ 44.978744][ T4995] [ 44.986865][ T4995] May be due to missing lock nesting notation [ 44.986865][ T4995] [ 44.995161][ T4995] 5 locks held by syz-executor974/4995: [ 45.000686][ T4995] #0: ffff88807e7ea410 (sb_writers#9){.+.+}-{0:0}, at: ksys_write+0x122/0x250 [ 45.009653][ T4995] #1: ffff88807a0aa4c0 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: generic_file_write_iter+0x92/0x350 [ 45.020952][ T4995] #2: ffff88807a0aa2c8 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1bf/0xf90 [ 45.031209][ T4995] #3: ffff88807e7ec0b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x174/0x230 [ 45.041297][ T4995] #4: ffff88807a0a8108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1bf/0xf90 [ 45.052698][ T4995] [ 45.052698][ T4995] stack backtrace: [ 45.059261][ T4995] CPU: 0 PID: 4995 Comm: syz-executor974 Not tainted 6.4.0-syzkaller-10098-g995b406c7e97 #0 [ 45.069308][ T4995] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 45.079348][ T4995] Call Trace: [ 45.082627][ T4995] [ 45.085549][ T4995] dump_stack_lvl+0xd9/0x150 [ 45.090156][ T4995] __lock_acquire+0x2a33/0x5e20 [ 45.095009][ T4995] ? lockdep_hardirqs_on+0x7d/0x100 [ 45.100208][ T4995] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 45.106186][ T4995] ? __stack_depot_save+0x23b/0x510 [ 45.111404][ T4995] lock_acquire+0x1b1/0x520 [ 45.115899][ T4995] ? hfsplus_find_init+0x174/0x230 [ 45.121020][ T4995] ? lock_sync+0x190/0x190 [ 45.125431][ T4995] ? block_write_begin+0xb9/0x4d0 [ 45.130461][ T4995] ? cont_write_begin+0x534/0x740 [ 45.135478][ T4995] __mutex_lock+0x12f/0x1350 [ 45.140067][ T4995] ? hfsplus_find_init+0x174/0x230 [ 45.145168][ T4995] ? hfsplus_find_init+0x174/0x230 [ 45.150272][ T4995] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 45.155821][ T4995] ? __kmem_cache_alloc_node+0x201/0x350 [ 45.161444][ T4995] ? hfsplus_find_init+0x95/0x230 [ 45.166459][ T4995] ? hfsplus_find_init+0x95/0x230 [ 45.171564][ T4995] ? rcu_is_watching+0x12/0xb0 [ 45.176327][ T4995] hfsplus_find_init+0x174/0x230 [ 45.181257][ T4995] hfsplus_ext_read_extent+0x185/0xae0 [ 45.186702][ T4995] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 45.192245][ T4995] ? _raw_spin_unlock+0x28/0x40 [ 45.197112][ T4995] ? hfsplus_free_extents+0x510/0x510 [ 45.202471][ T4995] ? hfsplus_block_allocate+0x7e/0x8c0 [ 45.207938][ T4995] ? rcu_is_watching+0x12/0xb0 [ 45.212710][ T4995] ? __mark_inode_dirty+0x297/0xd60 [ 45.217905][ T4995] hfsplus_file_extend+0x684/0xf90 [ 45.223004][ T4995] ? hfsplus_free_fork+0x7f0/0x7f0 [ 45.228119][ T4995] ? __mutex_lock+0x231/0x1350 [ 45.232881][ T4995] ? hfsplus_find_init+0x174/0x230 [ 45.237992][ T4995] ? hfsplus_brec_find+0x3ee/0x520 [ 45.243107][ T4995] ? hfsplus_brec_remove+0x4f0/0x4f0 [ 45.248382][ T4995] hfsplus_bmap_reserve+0x31c/0x410 [ 45.253570][ T4995] __hfsplus_ext_write_extent+0x44b/0x5b0 [ 45.259297][ T4995] hfsplus_ext_read_extent+0x845/0xae0 [ 45.264741][ T4995] ? mutex_lock_io_nested+0x11a0/0x11a0 [ 45.270287][ T4995] ? hfsplus_free_extents+0x510/0x510 [ 45.275651][ T4995] hfsplus_file_extend+0x684/0xf90 [ 45.280752][ T4995] ? hfsplus_free_fork+0x7f0/0x7f0 [ 45.285852][ T4995] ? __lock_buffer+0x70/0x70 [ 45.290441][ T4995] ? folio_create_buffers+0x10b/0x160 [ 45.295894][ T4995] ? rcu_is_watching+0x12/0xb0 [ 45.300660][ T4995] ? __mark_inode_dirty+0x297/0xd60 [ 45.305854][ T4995] hfsplus_get_block+0x1b3/0x9b0 [ 45.310780][ T4995] __block_write_begin_int+0x3b1/0x14a0 [ 45.316311][ T4995] ? hfsplus_file_extend+0xf90/0xf90 [ 45.321582][ T4995] ? invalidate_bh_lrus_cpu+0x170/0x170 [ 45.327113][ T4995] ? folio_flags.constprop.0+0x53/0x150 [ 45.332657][ T4995] ? hfsplus_file_extend+0xf90/0xf90 [ 45.337926][ T4995] block_write_begin+0xb9/0x4d0 [ 45.342848][ T4995] cont_write_begin+0x534/0x740 [ 45.347686][ T4995] ? hfsplus_file_extend+0xf90/0xf90 [ 45.352959][ T4995] ? block_write_begin+0x4d0/0x4d0 [ 45.358054][ T4995] ? fault_in_readable+0x129/0x210 [ 45.363157][ T4995] ? fault_in_subpage_writeable+0x20/0x20 [ 45.368862][ T4995] hfsplus_write_begin+0x87/0x150 [ 45.373870][ T4995] ? hfsplus_file_extend+0xf90/0xf90 [ 45.379144][ T4995] generic_perform_write+0x26b/0x5d0 [ 45.384433][ T4995] ? generic_file_readonly_mmap+0x190/0x190 [ 45.390319][ T4995] ? new_inode+0x280/0x280 [ 45.394724][ T4995] ? generic_write_checks_count+0x2c0/0x2c0 [ 45.400602][ T4995] __generic_file_write_iter+0x1f8/0x240 [ 45.406220][ T4995] generic_file_write_iter+0xe3/0x350 [ 45.411576][ T4995] vfs_write+0x981/0xda0 [ 45.415841][ T4995] ? kernel_write+0x680/0x680 [ 45.420509][ T4995] ? recalc_sigpending_tsk+0x18b/0x1d0 [ 45.425971][ T4995] ? find_held_lock+0x2d/0x110 [ 45.430723][ T4995] ? lock_downgrade+0x690/0x690 [ 45.435570][ T4995] ? __fget_light+0x201/0x270 [ 45.440242][ T4995] ksys_write+0x122/0x250 [ 45.444568][ T4995] ? __ia32_sys_read+0xb0/0xb0 [ 45.449322][ T4995] ? lockdep_hardirqs_on+0x7d/0x100 [ 45.454518][ T4995] ? _raw_spin_unlock_irq+0x2e/0x50 [ 45.459709][ T4995] ? ptrace_notify+0xfe/0x140 [ 45.464372][ T4995] do_syscall_64+0x39/0xb0 [ 45.468779][ T4995] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 45.474686][ T4995] RIP: 0033:0x7fcafe0f47d9 [ 45.479092][ T4995] 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 [ 45.498684][ T4995] RSP: 002b:00007ffe66802938 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 45.507081][ T4995] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcafe0f47d9 [ 45.515037][ T4995] RDX: 00000000fffffff0 RSI: 0000000020004200 RDI: 0000000000000004 [ 45.523082][ T4995] RBP: 00007fcafe0b4070 R08: 0000000000000000 R09: 0000000000000000 [ 45.531039][ T4995] R10: 0000000000000647 R11: 0000000000000246 R12: 00007fcafe0b4100 [ 45.538996][ T4995] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 45.546964][ T4995]