./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2914840422 <...> Warning: Permanently added '10.128.10.31' (ED25519) to the list of known hosts. execve("./syz-executor2914840422", ["./syz-executor2914840422"], 0x7ffe137cc5e0 /* 10 vars */) = 0 brk(NULL) = 0x55555596c000 brk(0x55555596cd00) = 0x55555596cd00 arch_prctl(ARCH_SET_FS, 0x55555596c380) = 0 set_tid_address(0x55555596c650) = 5018 set_robust_list(0x55555596c660, 24) = 0 rseq(0x55555596cca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor2914840422", 4096) = 28 getrandom("\x96\xf7\x98\xda\xac\x97\x47\xae", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55555596cd00 brk(0x55555598dd00) = 0x55555598dd00 brk(0x55555598e000) = 0x55555598e000 mprotect(0x7f56faa63000, 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) = 0x7f56f25ae000 [ 44.689477][ T5018] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=5018 'syz-executor291' 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(0x7f56f25ae000, 20699119) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 mkdir("./file0", 0777) = 0 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 [ 44.799054][ T5018] loop0: detected capacity change from 0 to 40427 [ 44.813704][ T5018] F2FS-fs (loop0): Found nat_bits in checkpoint [ 44.835131][ T5018] F2FS-fs (loop0): Mounted with checkpoint version = 48b305e5 [ 44.854915][ T5018] [ 44.857276][ T5018] ====================================================== [ 44.864293][ T5018] WARNING: possible circular locking dependency detected [ 44.871295][ T5018] 6.5.0-rc2-syzkaller-00322-g725d444db6b0 #0 Not tainted [ 44.878311][ T5018] ------------------------------------------------------ [ 44.885326][ T5018] syz-executor291/5018 is trying to acquire lock: [ 44.891737][ T5018] ffff888078158e00 (&fi->i_sem){+.+.}-{3:3}, at: f2fs_add_inline_entry+0x300/0x6f0 [ 44.901036][ T5018] [ 44.901036][ T5018] but task is already holding lock: [ 44.908379][ T5018] ffff888078159978 (&fi->i_xattr_sem){.+.+}-{3:3}, at: f2fs_add_dentry+0x92/0x230 [ 44.917600][ T5018] [ 44.917600][ T5018] which lock already depends on the new lock. [ 44.917600][ T5018] [ 44.928002][ T5018] [ 44.928002][ T5018] the existing dependency chain (in reverse order) is: [ 44.936993][ T5018] [ 44.936993][ T5018] -> #1 (&fi->i_xattr_sem){.+.+}-{3:3}: [ 44.944695][ T5018] down_read+0x9c/0x470 [ 44.949399][ T5018] f2fs_getxattr+0xb1e/0x12c0 [ 44.954584][ T5018] __f2fs_get_acl+0x5a/0x900 [ 44.959676][ T5018] f2fs_init_acl+0x15c/0xb30 [ 44.964761][ T5018] f2fs_init_inode_metadata+0x159/0x1290 [ 44.970893][ T5018] f2fs_add_regular_entry+0x79e/0xb90 [ 44.976762][ T5018] f2fs_add_dentry+0x1de/0x230 [ 44.982046][ T5018] f2fs_do_add_link+0x190/0x280 [ 44.987392][ T5018] f2fs_mkdir+0x377/0x620 [ 44.992219][ T5018] vfs_mkdir+0x532/0x7e0 [ 44.996960][ T5018] do_mkdirat+0x2a9/0x330 [ 45.001801][ T5018] __x64_sys_mkdirat+0x115/0x170 [ 45.007236][ T5018] do_syscall_64+0x38/0xb0 [ 45.012171][ T5018] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 45.018564][ T5018] [ 45.018564][ T5018] -> #0 (&fi->i_sem){+.+.}-{3:3}: [ 45.025741][ T5018] __lock_acquire+0x2e3d/0x5de0 [ 45.031147][ T5018] lock_acquire+0x1ae/0x510 [ 45.036150][ T5018] down_write+0x93/0x200 [ 45.040889][ T5018] f2fs_add_inline_entry+0x300/0x6f0 [ 45.046678][ T5018] f2fs_add_dentry+0xa6/0x230 [ 45.051870][ T5018] f2fs_do_add_link+0x190/0x280 [ 45.057218][ T5018] f2fs_rename2+0x1a27/0x27f0 [ 45.062391][ T5018] vfs_rename+0x13e0/0x1c30 [ 45.067387][ T5018] do_renameat2+0xc3c/0xdc0 [ 45.072385][ T5018] __x64_sys_renameat2+0xeb/0x130 [ 45.077928][ T5018] do_syscall_64+0x38/0xb0 [ 45.082843][ T5018] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 45.089244][ T5018] [ 45.089244][ T5018] other info that might help us debug this: [ 45.089244][ T5018] [ 45.099551][ T5018] Possible unsafe locking scenario: [ 45.099551][ T5018] [ 45.106975][ T5018] CPU0 CPU1 [ 45.112345][ T5018] ---- ---- [ 45.117693][ T5018] rlock(&fi->i_xattr_sem); [ 45.122260][ T5018] lock(&fi->i_sem); [ 45.128734][ T5018] lock(&fi->i_xattr_sem); [ 45.135735][ T5018] lock(&fi->i_sem); [ 45.139693][ T5018] [ 45.139693][ T5018] *** DEADLOCK *** [ 45.139693][ T5018] [ 45.147832][ T5018] 7 locks held by syz-executor291/5018: [ 45.153365][ T5018] #0: ffff88807727c410 (sb_writers#9){.+.+}-{0:0}, at: do_renameat2+0x3d5/0xdc0 [ 45.162472][ T5018] #1: ffff88807727c6f8 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: do_renameat2+0x4ec/0xdc0 [ 45.172528][ T5018] #2: ffff888075840a28 (&type->i_mutex_dir_key#6/1){+.+.}-{3:3}, at: lock_two_directories+0x65/0x1d0 [ 45.183467][ T5018] #3: ffff888078159300 (&type->i_mutex_dir_key#7/2){+.+.}-{3:3}, at: lock_two_directories+0x99/0x1d0 [ 45.194402][ T5018] #4: ffff888078158a28 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: lock_two_inodes+0x1b2/0x1e0 [ 45.205067][ T5018] #5: ffff88802a5c43b0 (&sbi->cp_rwsem){.+.+}-{3:3}, at: f2fs_rename2+0x192a/0x27f0 [ 45.214514][ T5018] #6: ffff888078159978 (&fi->i_xattr_sem){.+.+}-{3:3}, at: f2fs_add_dentry+0x92/0x230 [ 45.224133][ T5018] [ 45.224133][ T5018] stack backtrace: [ 45.229991][ T5018] CPU: 0 PID: 5018 Comm: syz-executor291 Not tainted 6.5.0-rc2-syzkaller-00322-g725d444db6b0 #0 [ 45.240389][ T5018] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2023 [ 45.250417][ T5018] Call Trace: [ 45.253671][ T5018] [ 45.256577][ T5018] dump_stack_lvl+0xd9/0x1b0 [ 45.261143][ T5018] check_noncircular+0x311/0x3f0 [ 45.266061][ T5018] ? print_circular_bug+0x750/0x750 [ 45.271241][ T5018] __lock_acquire+0x2e3d/0x5de0 [ 45.276072][ T5018] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 45.282032][ T5018] lock_acquire+0x1ae/0x510 [ 45.286511][ T5018] ? f2fs_add_inline_entry+0x300/0x6f0 [ 45.291947][ T5018] ? lock_sync+0x190/0x190 [ 45.296336][ T5018] ? __filemap_get_folio+0x1e7/0x990 [ 45.301594][ T5018] ? preempt_count_sub+0x150/0x150 [ 45.306693][ T5018] down_write+0x93/0x200 [ 45.310928][ T5018] ? f2fs_add_inline_entry+0x300/0x6f0 [ 45.316357][ T5018] ? down_write_killable_nested+0x250/0x250 [ 45.322227][ T5018] ? f2fs_room_for_filename+0xa6/0xc0 [ 45.327631][ T5018] f2fs_add_inline_entry+0x300/0x6f0 [ 45.332909][ T5018] ? f2fs_try_convert_inline_dir+0x3d0/0x3d0 [ 45.338867][ T5018] f2fs_add_dentry+0xa6/0x230 [ 45.343520][ T5018] f2fs_do_add_link+0x190/0x280 [ 45.348347][ T5018] ? f2fs_rename2+0x1916/0x27f0 [ 45.353170][ T5018] ? f2fs_add_dentry+0x230/0x230 [ 45.358082][ T5018] ? f2fs_rename2+0xe8a/0x27f0 [ 45.362821][ T5018] ? f2fs_dquot_initialize+0x117/0x2f0 [ 45.368257][ T5018] f2fs_rename2+0x1a27/0x27f0 [ 45.372909][ T5018] ? f2fs_tmpfile+0x250/0x250 [ 45.377562][ T5018] ? down_write_nested+0x153/0x200 [ 45.382661][ T5018] ? do_raw_spin_lock+0x12e/0x2b0 [ 45.387664][ T5018] ? spin_bug+0x1d0/0x1d0 [ 45.391972][ T5018] ? lock_two_inodes+0x1b2/0x1e0 [ 45.396887][ T5018] vfs_rename+0x13e0/0x1c30 [ 45.401367][ T5018] ? vfs_mkobj+0x5e0/0x5e0 [ 45.405755][ T5018] ? do_raw_spin_unlock+0x173/0x230 [ 45.410931][ T5018] ? bpf_lsm_path_rename+0x9/0x10 [ 45.415931][ T5018] ? security_path_rename+0x15e/0x230 [ 45.421280][ T5018] do_renameat2+0xc3c/0xdc0 [ 45.425759][ T5018] ? __ia32_sys_link+0xa0/0xa0 [ 45.430498][ T5018] ? reacquire_held_locks+0x4b0/0x4b0 [ 45.435845][ T5018] ? preempt_count_sub+0x150/0x150 [ 45.440934][ T5018] ? __check_object_size+0x323/0x740 [ 45.446191][ T5018] ? strncpy_from_user+0x214/0x300 [ 45.451279][ T5018] ? getname_flags.part.0+0x1d5/0x4d0 [ 45.456626][ T5018] __x64_sys_renameat2+0xeb/0x130 [ 45.461626][ T5018] do_syscall_64+0x38/0xb0 [ 45.466016][ T5018] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 45.471888][ T5018] RIP: 0033:0x7f56fa9eb779 [ 45.476275][ T5018] 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 [ 45.495856][ T5018] RSP: 002b:00007ffd06912498 EFLAGS: 00000246 ORIG_RAX: 000000000000013c renameat2(5, "./file0", 5, "./file0/file0", 0) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 45.504268][ T5018] RAX: ffffffffffffffd