./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor746901216 <...> Warning: Permanently added '10.128.1.33' (ED25519) to the list of known hosts. execve("./syz-executor746901216", ["./syz-executor746901216"], 0x7ffcbe3c74e0 /* 10 vars */) = 0 brk(NULL) = 0x555563d44000 brk(0x555563d44d00) = 0x555563d44d00 arch_prctl(ARCH_SET_FS, 0x555563d44380) = 0 set_tid_address(0x555563d44650) = 5098 set_robust_list(0x555563d44660, 24) = 0 rseq(0x555563d44ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor746901216", 4096) = 27 getrandom("\x05\x17\x1d\xaf\x28\x1f\x68\x3f", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555563d44d00 brk(0x555563d65d00) = 0x555563d65d00 brk(0x555563d66000) = 0x555563d66000 mprotect(0x7f8188d00000, 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) = 0x7f8180800000 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(0x7f8180800000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 close(4) = 0 mkdir("./file0", 0777) = 0 mount("/dev/loop0", "./file0", "hfsplus", MS_STRICTATIME, "") = 0 openat(AT_FDCWD, "./file0", O_RDONLY|O_DIRECTORY) = 3 chdir("./file0") = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = -1 EBUSY (Device or resource busy) [ 73.566265][ T5098] loop0: detected capacity change from 0 to 1024 [ 73.631399][ T5098] [ 73.633761][ T5098] ============================================ [ 73.639914][ T5098] WARNING: possible recursive locking detected [ 73.646053][ T5098] 6.9.0-rc5-next-20240426-syzkaller #0 Not tainted [ 73.652542][ T5098] -------------------------------------------- [ 73.658686][ T5098] syz-executor746/5098 is trying to acquire lock: [ 73.665251][ T5098] ffff88807cac9548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x383/0x14f0 [ 73.676146][ T5098] [ 73.676146][ T5098] but task is already holding lock: [ 73.683519][ T5098] ffff8880224407c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb50 [ 73.694681][ T5098] [ 73.694681][ T5098] other info that might help us debug this: [ 73.702737][ T5098] Possible unsafe locking scenario: [ 73.702737][ T5098] [ 73.710284][ T5098] CPU0 [ 73.713558][ T5098] ---- [ 73.716832][ T5098] lock(&HFSPLUS_I(inode)->extents_lock); [ 73.722652][ T5098] lock(&HFSPLUS_I(inode)->extents_lock); [ 73.728473][ T5098] [ 73.728473][ T5098] *** DEADLOCK *** [ 73.728473][ T5098] [ 73.736619][ T5098] May be due to missing lock nesting notation [ 73.736619][ T5098] [ 73.744971][ T5098] 4 locks held by syz-executor746/5098: [ 73.750528][ T5098] #0: ffff8880228c4420 (sb_writers#9){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 [ 73.759702][ T5098] #1: ffff8880224409c0 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: do_truncate+0x20c/0x310 [ 73.770076][ T5098] #2: ffff8880224407c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x2da/0xb50 [ 73.781755][ T5098] #3: ffff888021cc28f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_free+0xbb/0x4e0 [ 73.791780][ T5098] [ 73.791780][ T5098] stack backtrace: [ 73.797669][ T5098] CPU: 1 PID: 5098 Comm: syz-executor746 Not tainted 6.9.0-rc5-next-20240426-syzkaller #0 [ 73.807666][ T5098] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 [ 73.817724][ T5098] Call Trace: [ 73.821028][ T5098] [ 73.823965][ T5098] dump_stack_lvl+0x241/0x360 [ 73.828670][ T5098] ? __pfx_dump_stack_lvl+0x10/0x10 [ 73.833882][ T5098] ? print_deadlock_bug+0x479/0x620 [ 73.839093][ T5098] ? _find_first_zero_bit+0xd4/0x100 [ 73.844401][ T5098] validate_chain+0x15c1/0x58e0 [ 73.849277][ T5098] ? __pfx_stack_trace_save+0x10/0x10 [ 73.854656][ T5098] ? check_noncircular+0x259/0x4a0 [ 73.859775][ T5098] ? __pfx_validate_chain+0x10/0x10 [ 73.864987][ T5098] ? __pfx_check_noncircular+0x10/0x10 [ 73.870455][ T5098] ? lockdep_unlock+0x16a/0x300 [ 73.875313][ T5098] ? __pfx_lockdep_unlock+0x10/0x10 [ 73.880520][ T5098] ? add_lock_to_list+0x1de/0x2e0 [ 73.885552][ T5098] ? look_up_lock_class+0x77/0x160 [ 73.890694][ T5098] ? register_lock_class+0x102/0x980 [ 73.895990][ T5098] ? validate_chain+0x15a2/0x58e0 [ 73.901108][ T5098] ? is_bpf_text_address+0x26/0x2a0 [ 73.906321][ T5098] ? __pfx_register_lock_class+0x10/0x10 [ 73.911962][ T5098] ? mark_lock+0x9a/0x350 [ 73.916301][ T5098] __lock_acquire+0x1346/0x1fd0 [ 73.921166][ T5098] lock_acquire+0x1ed/0x550 [ 73.925674][ T5098] ? hfsplus_get_block+0x383/0x14f0 [ 73.930893][ T5098] ? __pfx_lock_acquire+0x10/0x10 [ 73.935925][ T5098] ? __pfx___might_resched+0x10/0x10 [ 73.941238][ T5098] ? filemap_read_folio+0x1a0/0x790 [ 73.946451][ T5098] ? __pfx_register_lock_class+0x10/0x10 [ 73.952087][ T5098] ? hfsplus_free_extents+0x17a/0xae0 [ 73.957473][ T5098] ? hfsplus_setattr+0x1ce/0x280 [ 73.962421][ T5098] ? notify_change+0xb9d/0xe70 [ 73.967203][ T5098] __mutex_lock+0x136/0xd70 [ 73.971713][ T5098] ? hfsplus_get_block+0x383/0x14f0 [ 73.976951][ T5098] ? hfsplus_get_block+0x383/0x14f0 [ 73.982163][ T5098] ? __pfx___mutex_lock+0x10/0x10 [ 73.987201][ T5098] hfsplus_get_block+0x383/0x14f0 [ 73.992244][ T5098] ? __pfx_hfsplus_get_block+0x10/0x10 [ 73.997719][ T5098] ? _raw_spin_unlock+0x28/0x50 [ 74.002586][ T5098] ? create_empty_buffers+0x53e/0x740 [ 74.007969][ T5098] block_read_full_folio+0x42e/0xe10 [ 74.013354][ T5098] ? __pfx_hfsplus_get_block+0x10/0x10 [ 74.018825][ T5098] ? __pfx_block_read_full_folio+0x10/0x10 [ 74.024639][ T5098] ? __pfx_lru_add_fn+0x10/0x10 [ 74.029496][ T5098] ? folio_add_lru+0x357/0xd70 [ 74.034279][ T5098] ? folio_add_lru+0x58f/0xd70 [ 74.039051][ T5098] filemap_read_folio+0x1a0/0x790 [ 74.044085][ T5098] ? __pfx_hfsplus_read_folio+0x10/0x10 [ 74.049645][ T5098] ? __pfx_filemap_read_folio+0x10/0x10 [ 74.055206][ T5098] ? __filemap_get_folio+0x92d/0xbb0 [ 74.060506][ T5098] ? hfsplus_block_free+0xbb/0x4e0 [ 74.065632][ T5098] do_read_cache_folio+0x134/0x820 [ 74.070749][ T5098] ? __pfx_hfsplus_read_folio+0x10/0x10 [ 74.076310][ T5098] do_read_cache_page+0x30/0x200 [ 74.081255][ T5098] hfsplus_block_free+0x128/0x4e0 [ 74.086300][ T5098] ? hfsplus_find_init+0x85/0x1c0 [ 74.091334][ T5098] hfsplus_free_extents+0x17a/0xae0 [ 74.096663][ T5098] hfsplus_file_truncate+0x7d0/0xb50 [ 74.101971][ T5098] ? __pfx_hfsplus_file_truncate+0x10/0x10 [ 74.107797][ T5098] ? unmap_mapping_range+0xf8/0x290 [ 74.113004][ T5098] ? __pfx_unmap_mapping_range+0x10/0x10 [ 74.118645][ T5098] ? setattr_prepare+0x1f5/0xb20 [ 74.123598][ T5098] ? truncate_setsize+0xcf/0xf0 [ 74.128457][ T5098] hfsplus_setattr+0x1ce/0x280 [ 74.133239][ T5098] ? __pfx_hfsplus_setattr+0x10/0x10 [ 74.138539][ T5098] notify_change+0xb9d/0xe70 [ 74.143147][ T5098] do_truncate+0x220/0x310 [ 74.147574][ T5098] ? __pfx_do_truncate+0x10/0x10 [ 74.152517][ T5098] ? apparmor_file_truncate+0x297/0x350 [ 74.158178][ T5098] path_openat+0x2a3d/0x3280 [ 74.162824][ T5098] ? __pfx_path_openat+0x10/0x10 [ 74.167794][ T5098] do_filp_open+0x235/0x490 [ 74.172315][ T5098] ? __pfx_do_filp_open+0x10/0x10 [ 74.177358][ T5098] ? _raw_spin_unlock+0x28/0x50 [ 74.182221][ T5098] ? alloc_fd+0x59d/0x640 [ 74.186564][ T5098] do_sys_openat2+0x13e/0x1d0 [ 74.191255][ T5098] ? __pfx_do_sys_openat2+0x10/0x10 [ 74.196470][ T5098] ? _raw_spin_unlock_irq+0x2e/0x50 [ 74.201711][ T5098] ? ptrace_notify+0x279/0x380 [ 74.206492][ T5098] __x64_sys_creat+0x123/0x170 [ 74.211269][ T5098] ? __pfx___x64_sys_creat+0x10/0x10 [ 74.216570][ T5098] ? do_syscall_64+0x102/0x240 [ 74.221349][ T5098] do_syscall_64+0xf5/0x240 [ 74.225877][ T5098] ? clear_bhb_loop+0x35/0x90 [ 74.230592][ T5098] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 74.236515][ T5098] RIP: 0033:0x7f8188c8d5f9 [ 74.240943][ T5098] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 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 b8 ff ff ff f7 d8 64 89 01 48 [ 74.260556][ T5098] RSP: 002b:00007ffd4e6964e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 [ 74.268976][ T5098] RAX: ffffffffffffffda RBX: 00007ffd4e6966c8 RCX: 00007f8188c8d5f9 creat("./file1", 0441) = 4 exit_group(0) = ? +++ exited with 0 +++ [ 74.276957][ T5098] RDX: 00007f8188c8c691 RSI: 0000000000000121 RDI: 0000000020000