./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor4137620616 <...> Warning: Permanently added '10.128.1.34' (ED25519) to the list of known hosts. execve("./syz-executor4137620616", ["./syz-executor4137620616"], 0x7ffdb4f6d290 /* 10 vars */) = 0 brk(NULL) = 0x5555559ee000 brk(0x5555559eed00) = 0x5555559eed00 arch_prctl(ARCH_SET_FS, 0x5555559ee380) = 0 set_tid_address(0x5555559ee650) = 5020 set_robust_list(0x5555559ee660, 24) = 0 rseq(0x5555559eeca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor4137620616", 4096) = 28 getrandom("\x77\x99\x09\xbd\xa3\xa1\xba\x13", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x5555559eed00 brk(0x555555a0fd00) = 0x555555a0fd00 brk(0x555555a10000) = 0x555555a10000 mprotect(0x7f1391607000, 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) = 0x7f138914f000 [ 45.414752][ T5020] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5020 'syz-executor413' 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"..., 32394836) = 32394836 munmap(0x7f138914f000, 32394836) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./mnt", 0777) = 0 [ 45.620299][ T5020] loop0: detected capacity change from 0 to 63271 [ 45.630833][ T5020] F2FS-fs (loop0): Mismatch start address, segment0(512) cp_blkaddr(605) [ 45.639348][ T5020] F2FS-fs (loop0): Can't find valid F2FS filesystem in 1th superblock [ 45.649258][ T5020] F2FS-fs (loop0): invalid crc value [ 45.657157][ T5020] F2FS-fs (loop0): Found nat_bits in checkpoint mount("/dev/loop0", "./mnt", "f2fs", MS_SYNCHRONOUS, "") = 0 openat(AT_FDCWD, "./mnt", O_RDONLY|O_DIRECTORY) = 3 chdir("./mnt") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 openat(AT_FDCWD, ".", O_RDONLY) = 4 mkdirat(4, "./bus", 000) = 0 [ 45.678314][ T5020] F2FS-fs (loop0): Try to recover 1th superblock, ret: 0 [ 45.685454][ T5020] F2FS-fs (loop0): Mounted with checkpoint version = 753bd00b [ 45.706091][ T5020] [ 45.708438][ T5020] ====================================================== [ 45.715454][ T5020] WARNING: possible circular locking dependency detected [ 45.722466][ T5020] 6.5.0-rc3-syzkaller-00123-g57012c57536f #0 Not tainted [ 45.729459][ T5020] ------------------------------------------------------ [ 45.736444][ T5020] syz-executor413/5020 is trying to acquire lock: [ 45.742825][ T5020] ffff88807fbda888 (&fi->i_sem){+.+.}-{3:3}, at: f2fs_add_inline_entry+0x300/0x6f0 [ 45.752116][ T5020] [ 45.752116][ T5020] but task is already holding lock: [ 45.759451][ T5020] ffff88807fbda250 (&fi->i_xattr_sem){.+.+}-{3:3}, at: f2fs_add_dentry+0x92/0x230 [ 45.768636][ T5020] [ 45.768636][ T5020] which lock already depends on the new lock. [ 45.768636][ T5020] [ 45.779009][ T5020] [ 45.779009][ T5020] the existing dependency chain (in reverse order) is: [ 45.787991][ T5020] [ 45.787991][ T5020] -> #1 (&fi->i_xattr_sem){.+.+}-{3:3}: [ 45.795693][ T5020] down_read+0x9c/0x470 [ 45.800456][ T5020] f2fs_getxattr+0xb1e/0x12c0 [ 45.805635][ T5020] __f2fs_get_acl+0x5a/0x900 [ 45.810811][ T5020] f2fs_init_acl+0x15c/0xb30 [ 45.815902][ T5020] f2fs_init_inode_metadata+0x159/0x1290 [ 45.822034][ T5020] f2fs_add_regular_entry+0x79e/0xb90 [ 45.827914][ T5020] f2fs_add_dentry+0x1de/0x230 [ 45.833180][ T5020] f2fs_do_add_link+0x190/0x280 [ 45.838534][ T5020] f2fs_mkdir+0x377/0x620 [ 45.843369][ T5020] vfs_mkdir+0x532/0x7e0 [ 45.848116][ T5020] do_mkdirat+0x2a9/0x330 [ 45.852962][ T5020] __x64_sys_mkdirat+0x115/0x170 [ 45.858403][ T5020] do_syscall_64+0x38/0xb0 [ 45.863319][ T5020] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 45.869713][ T5020] [ 45.869713][ T5020] -> #0 (&fi->i_sem){+.+.}-{3:3}: [ 45.876918][ T5020] __lock_acquire+0x2e3d/0x5de0 [ 45.882275][ T5020] lock_acquire+0x1ae/0x510 [ 45.887284][ T5020] down_write+0x93/0x200 [ 45.892029][ T5020] f2fs_add_inline_entry+0x300/0x6f0 [ 45.897822][ T5020] f2fs_add_dentry+0xa6/0x230 [ 45.902999][ T5020] f2fs_do_add_link+0x190/0x280 [ 45.908353][ T5020] f2fs_mkdir+0x377/0x620 [ 45.913187][ T5020] vfs_mkdir+0x532/0x7e0 [ 45.917933][ T5020] do_mkdirat+0x2a9/0x330 [ 45.922766][ T5020] __x64_sys_mkdirat+0x115/0x170 [ 45.928208][ T5020] do_syscall_64+0x38/0xb0 [ 45.933130][ T5020] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 45.939529][ T5020] [ 45.939529][ T5020] other info that might help us debug this: [ 45.939529][ T5020] [ 45.949739][ T5020] Possible unsafe locking scenario: [ 45.949739][ T5020] [ 45.957164][ T5020] CPU0 CPU1 [ 45.962508][ T5020] ---- ---- [ 45.967850][ T5020] rlock(&fi->i_xattr_sem); [ 45.972418][ T5020] lock(&fi->i_sem); [ 45.979117][ T5020] lock(&fi->i_xattr_sem); [ 45.986134][ T5020] lock(&fi->i_sem); [ 45.990101][ T5020] [ 45.990101][ T5020] *** DEADLOCK *** [ 45.990101][ T5020] [ 45.998224][ T5020] 4 locks held by syz-executor413/5020: [ 46.003744][ T5020] #0: ffff88807db3e410 (sb_writers#9){.+.+}-{0:0}, at: filename_create+0x10d/0x530 [ 46.013138][ T5020] #1: ffff88807fbd9bd8 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: filename_create+0x1c2/0x530 [ 46.023744][ T5020] #2: ffff88807e5043b0 (&sbi->cp_rwsem){++++}-{3:3}, at: f2fs_mkdir+0x293/0x620 [ 46.032862][ T5020] #3: ffff88807fbda250 (&fi->i_xattr_sem){.+.+}-{3:3}, at: f2fs_add_dentry+0x92/0x230 [ 46.042496][ T5020] [ 46.042496][ T5020] stack backtrace: [ 46.048361][ T5020] CPU: 0 PID: 5020 Comm: syz-executor413 Not tainted 6.5.0-rc3-syzkaller-00123-g57012c57536f #0 [ 46.058753][ T5020] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 [ 46.068789][ T5020] Call Trace: [ 46.072053][ T5020] [ 46.074966][ T5020] dump_stack_lvl+0xd9/0x1b0 [ 46.079544][ T5020] check_noncircular+0x311/0x3f0 [ 46.084469][ T5020] ? print_circular_bug+0x750/0x750 [ 46.089654][ T5020] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 46.095626][ T5020] __lock_acquire+0x2e3d/0x5de0 [ 46.100466][ T5020] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 46.106434][ T5020] lock_acquire+0x1ae/0x510 [ 46.110929][ T5020] ? f2fs_add_inline_entry+0x300/0x6f0 [ 46.116375][ T5020] ? lock_sync+0x190/0x190 [ 46.120777][ T5020] ? __filemap_get_folio+0x1e7/0x990 [ 46.126063][ T5020] ? preempt_count_sub+0x150/0x150 [ 46.131187][ T5020] down_write+0x93/0x200 [ 46.135422][ T5020] ? f2fs_add_inline_entry+0x300/0x6f0 [ 46.140868][ T5020] ? down_write_killable_nested+0x250/0x250 [ 46.146751][ T5020] ? f2fs_room_for_filename+0xa6/0xc0 [ 46.152109][ T5020] f2fs_add_inline_entry+0x300/0x6f0 [ 46.157381][ T5020] ? f2fs_try_convert_inline_dir+0x3d0/0x3d0 [ 46.163352][ T5020] f2fs_add_dentry+0xa6/0x230 [ 46.168012][ T5020] f2fs_do_add_link+0x190/0x280 [ 46.172871][ T5020] ? f2fs_add_dentry+0x230/0x230 [ 46.177793][ T5020] ? f2fs_mkdir+0x11e/0x620 [ 46.182370][ T5020] ? f2fs_dquot_initialize+0x117/0x2f0 [ 46.187808][ T5020] f2fs_mkdir+0x377/0x620 [ 46.192211][ T5020] ? bpf_lsm_inode_mkdir+0x9/0x10 [ 46.197226][ T5020] ? security_inode_mkdir+0xdd/0x110 [ 46.202499][ T5020] vfs_mkdir+0x532/0x7e0 [ 46.206987][ T5020] do_mkdirat+0x2a9/0x330 [ 46.211297][ T5020] ? __ia32_sys_mknod+0xb0/0xb0 [ 46.216132][ T5020] ? getname_flags.part.0+0x1d5/0x4d0 [ 46.221488][ T5020] __x64_sys_mkdirat+0x115/0x170 [ 46.226410][ T5020] do_syscall_64+0x38/0xb0 [ 46.230898][ T5020] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 46.236779][ T5020] RIP: 0033:0x7f139158c639 [ 46.241179][ T5020] 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 [ 46.260768][ T5020] RSP: 002b:00007ffce42fb158 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 [ 46.269425][ T5020] RAX: ffffffffffffffda RBX: 00007ffce42fb328 RCX: 00007f139158c639 mkdirat(4, "./bus/file0", 000) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 46.277377][ T5020] RDX: 000000000000000