./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2156975282 <...> Warning: Permanently added '10.128.0.176' (ED25519) to the list of known hosts. execve("./syz-executor2156975282", ["./syz-executor2156975282"], 0x7ffd303d0f70 /* 10 vars */) = 0 brk(NULL) = 0x55555724b000 brk(0x55555724bd00) = 0x55555724bd00 arch_prctl(ARCH_SET_FS, 0x55555724b380) = 0 set_tid_address(0x55555724b650) = 5019 set_robust_list(0x55555724b660, 24) = 0 rseq(0x55555724bca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor2156975282", 4096) = 28 getrandom("\x4f\xdd\x85\x14\x0b\x97\xd7\x6d", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55555724bd00 brk(0x55555726cd00) = 0x55555726cd00 brk(0x55555726d000) = 0x55555726d000 mprotect(0x7fe068916000, 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) = 0x7fe060461000 [ 53.285540][ T5019] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5019 'syz-executor215' 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"..., 20699119) = 20699119 munmap(0x7fe060461000, 20699119) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file0", 0777) = 0 [ 53.426805][ T5019] loop0: detected capacity change from 0 to 40427 [ 53.443756][ T5019] F2FS-fs (loop0): Found nat_bits in checkpoint mount("/dev/loop0", "./file0", "f2fs", 0, "nolazytime,lazytime,") = 0 openat(AT_FDCWD, "./file0", O_RDONLY|O_DIRECTORY) = 3 chdir("./file0") = 0 ioctl(4, LOOP_CLR_FD) = 0 close(4) = 0 open(".", O_RDONLY) = 4 symlinkat("\x13\x13\x77\xc5\xfc\x35\xd4\x14\x54\xd5\xd4\x1d\x29\xad\x1a\x60\x29\x59\x81\x46\xe6\xbe\x16\x6e\x41\xad\x0d\xbd\x40\x54\x03\x3c\x9f\x33\xbb\xda\x82\x24\xa2\xf3\xd7\x72\xe7\x63\x6e\x48\xb3\x3c\xbf\x70\x83\x72\xe8\xf1\xb9\x93\x3e\xc5\x12\x77\x43\xbe\x22\x06\x20\x9e\xf0\x2d\xf9\xcb\xf2\xf6\xe8\x80\xd3\x38\x2f", 4, "./file0") = 0 mkdirat(4, "\x13\x13\x77\xc5\xfc\x35\xd4\x14\x54\xd5\xd4\x1d\x29\xad\x1a\x60\x29\x59\x81\x46\xe6\xbe\x16\x6e\x41\xad\x0d\xbd\x40\x54\x03\x3c\x9f\x33\xbb\xda\x82\x24\xa2\xf3\xd7\x72\xe7\x63\x6e\x48\xb3\x3c\xbf\x70\x83\x72\xe8\xf1\xb9\x93\x3e\xc5\x12\x77\x43\xbe\x22\x06\x20\x9e\xf0\x2d\xf9\xcb\xf2\xf6\xe8\x80\xd3\x38\x2f", 000) = 0 open(".", O_RDONLY) = 5 [ 53.467456][ T5019] F2FS-fs (loop0): Mounted with checkpoint version = 48b305e5 [ 53.486692][ T5019] [ 53.489069][ T5019] ====================================================== [ 53.496093][ T5019] WARNING: possible circular locking dependency detected [ 53.503130][ T5019] 6.5.0-rc7-syzkaller-00185-g28f20a19294d #0 Not tainted [ 53.510153][ T5019] ------------------------------------------------------ [ 53.517240][ T5019] syz-executor215/5019 is trying to acquire lock: [ 53.523634][ T5019] ffff888078be16d8 (&fi->i_sem){+.+.}-{3:3}, at: f2fs_add_inline_entry+0x300/0x6f0 [ 53.532983][ T5019] [ 53.532983][ T5019] but task is already holding lock: [ 53.540442][ T5019] ffff888078be2250 (&fi->i_xattr_sem){.+.+}-{3:3}, at: f2fs_add_dentry+0x92/0x230 [ 53.549709][ T5019] [ 53.549709][ T5019] which lock already depends on the new lock. [ 53.549709][ T5019] [ 53.560109][ T5019] [ 53.560109][ T5019] the existing dependency chain (in reverse order) is: [ 53.569108][ T5019] [ 53.569108][ T5019] -> #1 (&fi->i_xattr_sem){.+.+}-{3:3}: [ 53.576824][ T5019] down_read+0x9c/0x470 [ 53.581518][ T5019] f2fs_getxattr+0xb1e/0x12c0 [ 53.586706][ T5019] __f2fs_get_acl+0x5a/0x900 [ 53.591894][ T5019] f2fs_init_acl+0x15c/0xb30 [ 53.596996][ T5019] f2fs_init_inode_metadata+0x159/0x1290 [ 53.603167][ T5019] f2fs_add_regular_entry+0x79e/0xb90 [ 53.609055][ T5019] f2fs_add_dentry+0x1de/0x230 [ 53.614331][ T5019] f2fs_do_add_link+0x190/0x280 [ 53.619692][ T5019] f2fs_mkdir+0x377/0x620 [ 53.624538][ T5019] vfs_mkdir+0x532/0x7e0 [ 53.629376][ T5019] do_mkdirat+0x2a9/0x330 [ 53.634391][ T5019] __x64_sys_mkdirat+0x115/0x170 [ 53.639842][ T5019] do_syscall_64+0x38/0xb0 [ 53.644856][ T5019] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 53.651351][ T5019] [ 53.651351][ T5019] -> #0 (&fi->i_sem){+.+.}-{3:3}: [ 53.658568][ T5019] __lock_acquire+0x2e3d/0x5de0 [ 53.663948][ T5019] lock_acquire+0x1ae/0x510 [ 53.668966][ T5019] down_write+0x93/0x200 [ 53.673727][ T5019] f2fs_add_inline_entry+0x300/0x6f0 [ 53.679549][ T5019] f2fs_add_dentry+0xa6/0x230 [ 53.684737][ T5019] f2fs_do_add_link+0x190/0x280 [ 53.690095][ T5019] f2fs_rename2+0x1a27/0x27f0 [ 53.695289][ T5019] vfs_rename+0x13e0/0x1c30 [ 53.700303][ T5019] do_renameat2+0xc3c/0xdc0 [ 53.705319][ T5019] __x64_sys_renameat2+0xeb/0x130 [ 53.710863][ T5019] do_syscall_64+0x38/0xb0 [ 53.715792][ T5019] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 53.722197][ T5019] [ 53.722197][ T5019] other info that might help us debug this: [ 53.722197][ T5019] [ 53.732410][ T5019] Possible unsafe locking scenario: [ 53.732410][ T5019] [ 53.739842][ T5019] CPU0 CPU1 [ 53.745275][ T5019] ---- ---- [ 53.750708][ T5019] rlock(&fi->i_xattr_sem); [ 53.755302][ T5019] lock(&fi->i_sem); [ 53.761787][ T5019] lock(&fi->i_xattr_sem); [ 53.768794][ T5019] lock(&fi->i_sem); [ 53.772762][ T5019] [ 53.772762][ T5019] *** DEADLOCK *** [ 53.772762][ T5019] [ 53.780889][ T5019] 7 locks held by syz-executor215/5019: [ 53.786413][ T5019] #0: ffff88807931c410 (sb_writers#9){.+.+}-{0:0}, at: do_renameat2+0x3d5/0xdc0 [ 53.795561][ T5019] #1: ffff88807931c6f8 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: do_renameat2+0x4ec/0xdc0 [ 53.805646][ T5019] #2: ffff888078be0a28 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: lock_two_directories+0x65/0x1d0 [ 53.816614][ T5019] #3: ffff888078be1bd8 (&type->i_mutex_dir_key#7/2){+.+.}-{3:3}, at: lock_two_directories+0x99/0x1d0 [ 53.827581][ T5019] #4: ffff888078be1300 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: lock_two_inodes+0x1b2/0x1e0 [ 53.838285][ T5019] #5: ffff88807977c3b0 (&sbi->cp_rwsem){.+.+}-{3:3}, at: f2fs_rename2+0x192a/0x27f0 [ 53.847763][ T5019] #6: ffff888078be2250 (&fi->i_xattr_sem){.+.+}-{3:3}, at: f2fs_add_dentry+0x92/0x230 [ 53.857402][ T5019] [ 53.857402][ T5019] stack backtrace: [ 53.863274][ T5019] CPU: 1 PID: 5019 Comm: syz-executor215 Not tainted 6.5.0-rc7-syzkaller-00185-g28f20a19294d #0 [ 53.873672][ T5019] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 [ 53.883715][ T5019] Call Trace: [ 53.886980][ T5019] [ 53.889986][ T5019] dump_stack_lvl+0xd9/0x1b0 [ 53.894655][ T5019] check_noncircular+0x311/0x3f0 [ 53.899621][ T5019] ? print_circular_bug+0x750/0x750 [ 53.904816][ T5019] __lock_acquire+0x2e3d/0x5de0 [ 53.909663][ T5019] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 53.915638][ T5019] lock_acquire+0x1ae/0x510 [ 53.920135][ T5019] ? f2fs_add_inline_entry+0x300/0x6f0 [ 53.925585][ T5019] ? lock_sync+0x190/0x190 [ 53.929995][ T5019] ? __filemap_get_folio+0x1e7/0x990 [ 53.935309][ T5019] ? preempt_count_sub+0x150/0x150 [ 53.940429][ T5019] down_write+0x93/0x200 [ 53.944667][ T5019] ? f2fs_add_inline_entry+0x300/0x6f0 [ 53.950117][ T5019] ? down_write_killable_nested+0x250/0x250 [ 53.956002][ T5019] ? f2fs_room_for_filename+0xa6/0xc0 [ 53.961370][ T5019] f2fs_add_inline_entry+0x300/0x6f0 [ 53.966648][ T5019] ? f2fs_try_convert_inline_dir+0x3d0/0x3d0 [ 53.972623][ T5019] f2fs_add_dentry+0xa6/0x230 [ 53.977294][ T5019] f2fs_do_add_link+0x190/0x280 [ 53.982134][ T5019] ? f2fs_rename2+0x1916/0x27f0 [ 53.986977][ T5019] ? f2fs_add_dentry+0x230/0x230 [ 53.992078][ T5019] ? f2fs_rename2+0xe8a/0x27f0 [ 53.996833][ T5019] ? f2fs_dquot_initialize+0x117/0x2f0 [ 54.002306][ T5019] f2fs_rename2+0x1a27/0x27f0 [ 54.006978][ T5019] ? f2fs_tmpfile+0x250/0x250 [ 54.011648][ T5019] ? down_write_nested+0x153/0x200 [ 54.016753][ T5019] ? do_raw_spin_lock+0x12e/0x2b0 [ 54.021772][ T5019] ? spin_bug+0x1d0/0x1d0 [ 54.026091][ T5019] ? lock_two_inodes+0x1b2/0x1e0 [ 54.031024][ T5019] vfs_rename+0x13e0/0x1c30 [ 54.035522][ T5019] ? vfs_mkobj+0x5e0/0x5e0 [ 54.040009][ T5019] ? do_raw_spin_unlock+0x173/0x230 [ 54.045201][ T5019] ? bpf_lsm_path_rename+0x9/0x10 [ 54.050231][ T5019] ? security_path_rename+0x15e/0x230 [ 54.055599][ T5019] do_renameat2+0xc3c/0xdc0 [ 54.060097][ T5019] ? __ia32_sys_link+0xa0/0xa0 [ 54.064852][ T5019] ? reacquire_held_locks+0x4b0/0x4b0 [ 54.070218][ T5019] ? preempt_count_sub+0x150/0x150 [ 54.075331][ T5019] ? __check_object_size+0x323/0x740 [ 54.080696][ T5019] ? strncpy_from_user+0x214/0x300 [ 54.085799][ T5019] ? getname_flags.part.0+0x1d5/0x4d0 [ 54.091160][ T5019] __x64_sys_renameat2+0xeb/0x130 [ 54.096177][ T5019] do_syscall_64+0x38/0xb0 [ 54.100581][ T5019] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 54.106465][ T5019] RIP: 0033:0x7fe06889e779 [ 54.110867][ T5019] 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 [ 54.130461][ T5019] RSP: 002b:00007ffe2ab179e8 EFLAGS: 00000246 ORIG_RAX: 000000000000013c [ 54.138861][ T5019] RAX: ffffffffffffffda RBX: 00007ffe2ab17bb8 RCX: 00007fe06889e779 [ 54.146822][ T5019] RDX: 0000000000000005 RSI: 00000000200001c0 RDI: 0000000000000005 [ 54.154779][ T5019] RBP: 00007fe068916610 R08: 0000000000000000 R09: 00007ffe2ab17bb8 [ 54.162735][ T5019] R10: 00000000200002c0 R11: 0000000000000246 R12: 0000000000000001 renameat2(5, "./file0", 5, "./file0/file0", 0) = 0 exit_group(0) = ? +++ exited with 0 +++