./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor238507364 <...> Warning: Permanently added '10.128.1.1' (ECDSA) to the list of known hosts. execve("./syz-executor238507364", ["./syz-executor238507364"], 0x7ffec152bd90 /* 10 vars */) = 0 brk(NULL) = 0x55555588c000 brk(0x55555588cc40) = 0x55555588cc40 arch_prctl(ARCH_SET_FS, 0x55555588c300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor238507364", 4096) = 27 brk(0x5555558adc40) = 0x5555558adc40 brk(0x5555558ae000) = 0x5555558ae000 mprotect(0x7f01596f1000, 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 openat(AT_FDCWD, "io.stat", O_RDWR|O_CREAT|O_NOCTTY|O_TRUNC|O_APPEND|FASYNC|0x18, 000) = 3 ioctl(3, FS_IOC_SETFLAGS, [FS_JOURNAL_DATA_FL]) = 0 openat(AT_FDCWD, "cgroup.controllers", O_RDWR|O_CREAT|O_NOCTTY|O_TRUNC|O_APPEND|FASYNC|0x18, 000) = 4 syzkaller login: [ 54.063256][ T5079] [ 54.065624][ T5079] ====================================================== [ 54.072623][ T5079] WARNING: possible circular locking dependency detected [ 54.079628][ T5079] 6.2.0-syzkaller-12886-g37d9df224d1e #0 Not tainted [ 54.086290][ T5079] ------------------------------------------------------ [ 54.093286][ T5079] syz-executor238/5079 is trying to acquire lock: [ 54.099674][ T5079] ffff888144ff0400 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: ext4_bmap+0x52/0x470 [ 54.109247][ T5079] [ 54.109247][ T5079] but task is already holding lock: [ 54.116598][ T5079] ffff88814afe83f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x47f/0xc90 [ 54.127183][ T5079] [ 54.127183][ T5079] which lock already depends on the new lock. [ 54.127183][ T5079] [ 54.137572][ T5079] [ 54.137572][ T5079] the existing dependency chain (in reverse order) is: [ 54.146563][ T5079] [ 54.146563][ T5079] -> #3 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 54.155316][ T5079] mutex_lock_io_nested+0x143/0x11a0 [ 54.161113][ T5079] jbd2_journal_flush+0x19e/0xc90 [ 54.166643][ T5079] __ext4_ioctl+0xb3f/0x4c90 [ 54.171753][ T5079] __x64_sys_ioctl+0x197/0x210 [ 54.177033][ T5079] do_syscall_64+0x39/0xb0 [ 54.181955][ T5079] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 54.188357][ T5079] [ 54.188357][ T5079] -> #2 (&journal->j_barrier){+.+.}-{3:3}: [ 54.196323][ T5079] __mutex_lock+0x12f/0x1350 [ 54.201420][ T5079] jbd2_journal_lock_updates+0x162/0x310 [ 54.207562][ T5079] ext4_change_inode_journal_flag+0x188/0x550 [ 54.214138][ T5079] ext4_fileattr_set+0xe78/0x1a50 [ 54.219669][ T5079] vfs_fileattr_set+0x7ff/0xc40 [ 54.225029][ T5079] do_vfs_ioctl+0xfa8/0x1670 [ 54.230149][ T5079] __x64_sys_ioctl+0x10c/0x210 [ 54.235427][ T5079] do_syscall_64+0x39/0xb0 [ 54.240352][ T5079] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 54.246758][ T5079] [ 54.246758][ T5079] -> #1 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 54.255161][ T5079] percpu_down_write+0x53/0x390 [ 54.260520][ T5079] ext4_ind_migrate+0x23b/0x860 [ 54.265878][ T5079] ext4_fileattr_set+0x1582/0x1a50 [ 54.273323][ T5079] vfs_fileattr_set+0x7ff/0xc40 [ 54.278682][ T5079] do_vfs_ioctl+0xfa8/0x1670 [ 54.283779][ T5079] __x64_sys_ioctl+0x10c/0x210 [ 54.289049][ T5079] do_syscall_64+0x39/0xb0 [ 54.293967][ T5079] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 54.300368][ T5079] [ 54.300368][ T5079] -> #0 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 54.308945][ T5079] __lock_acquire+0x2ec7/0x5d40 [ 54.314298][ T5079] lock_acquire+0x1e3/0x670 [ 54.319301][ T5079] down_read+0x3d/0x50 [ 54.323876][ T5079] ext4_bmap+0x52/0x470 [ 54.328549][ T5079] bmap+0xae/0x120 [ 54.332804][ T5079] jbd2_journal_bmap+0xac/0x1c0 [ 54.338170][ T5079] jbd2_journal_flush+0x87b/0xc90 [ 54.343713][ T5079] __ext4_ioctl+0xb3f/0x4c90 [ 54.348814][ T5079] __x64_sys_ioctl+0x197/0x210 [ 54.354085][ T5079] do_syscall_64+0x39/0xb0 [ 54.359005][ T5079] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 54.365404][ T5079] [ 54.365404][ T5079] other info that might help us debug this: [ 54.365404][ T5079] [ 54.375609][ T5079] Chain exists of: [ 54.375609][ T5079] &sb->s_type->i_mutex_key#8 --> &journal->j_barrier --> &journal->j_checkpoint_mutex [ 54.375609][ T5079] [ 54.391052][ T5079] Possible unsafe locking scenario: [ 54.391052][ T5079] [ 54.398479][ T5079] CPU0 CPU1 [ 54.403818][ T5079] ---- ---- [ 54.409183][ T5079] lock(&journal->j_checkpoint_mutex); [ 54.414709][ T5079] lock(&journal->j_barrier); [ 54.421968][ T5079] lock(&journal->j_checkpoint_mutex); [ 54.430007][ T5079] lock(&sb->s_type->i_mutex_key#8); [ 54.435455][ T5079] [ 54.435455][ T5079] *** DEADLOCK *** [ 54.435455][ T5079] [ 54.443580][ T5079] 2 locks held by syz-executor238/5079: [ 54.449100][ T5079] #0: ffff88814afe8170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x162/0x310 [ 54.459960][ T5079] #1: ffff88814afe83f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x47f/0xc90 [ 54.470986][ T5079] [ 54.470986][ T5079] stack backtrace: [ 54.476853][ T5079] CPU: 1 PID: 5079 Comm: syz-executor238 Not tainted 6.2.0-syzkaller-12886-g37d9df224d1e #0 [ 54.486894][ T5079] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 [ 54.496934][ T5079] Call Trace: [ 54.500201][ T5079] [ 54.503114][ T5079] dump_stack_lvl+0xd9/0x150 [ 54.507693][ T5079] check_noncircular+0x25f/0x2e0 [ 54.512616][ T5079] ? print_circular_bug+0x5c0/0x5c0 [ 54.517796][ T5079] ? __switch_to+0x5d0/0x1110 [ 54.522458][ T5079] ? mark_lock.part.0+0xee/0x1970 [ 54.527466][ T5079] ? print_usage_bug.part.0+0x660/0x660 [ 54.533000][ T5079] __lock_acquire+0x2ec7/0x5d40 [ 54.537833][ T5079] ? __wait_on_bit+0xd4/0x180 [ 54.542497][ T5079] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 54.548470][ T5079] lock_acquire+0x1e3/0x670 [ 54.552966][ T5079] ? ext4_bmap+0x52/0x470 [ 54.557281][ T5079] ? out_of_line_wait_on_bit_timeout+0x170/0x170 [ 54.563595][ T5079] ? lock_release+0x780/0x780 [ 54.568255][ T5079] down_read+0x3d/0x50 [ 54.572310][ T5079] ? ext4_bmap+0x52/0x470 [ 54.576634][ T5079] ext4_bmap+0x52/0x470 [ 54.580786][ T5079] ? mpage_release_unused_pages+0x870/0x870 [ 54.586663][ T5079] bmap+0xae/0x120 [ 54.590369][ T5079] ? do_raw_read_unlock+0xe0/0xe0 [ 54.595379][ T5079] jbd2_journal_bmap+0xac/0x1c0 [ 54.600214][ T5079] ? jbd2_log_start_commit+0x50/0x50 [ 54.605481][ T5079] ? _raw_write_unlock+0x28/0x40 [ 54.610417][ T5079] ? jbd2_mark_journal_empty+0x307/0x3f0 [ 54.616034][ T5079] jbd2_journal_flush+0x87b/0xc90 [ 54.621043][ T5079] ? apparmor_capable+0x1dc/0x460 [ 54.626053][ T5079] ? jbd2_fc_get_buf+0x310/0x310 [ 54.630990][ T5079] ? bpf_lsm_capable+0x9/0x10 [ 54.635659][ T5079] ? security_capable+0x93/0xc0 [ 54.640495][ T5079] __ext4_ioctl+0xb3f/0x4c90 [ 54.645079][ T5079] ? tomoyo_path_number_perm+0x166/0x570 [ 54.650700][ T5079] ? ext4_reset_inode_seed+0x450/0x450 [ 54.656324][ T5079] ? __sanitizer_cov_trace_switch+0x54/0x90 [ 54.662203][ T5079] ? do_vfs_ioctl+0x132/0x1670 [ 54.666957][ T5079] ? vfs_fileattr_set+0xc40/0xc40 [ 54.671969][ T5079] ? find_held_lock+0x2d/0x110 [ 54.676716][ T5079] ? put_page+0x2/0x280 [ 54.680874][ T5079] ? ext4_fileattr_set+0x1a50/0x1a50 [ 54.686147][ T5079] __x64_sys_ioctl+0x197/0x210 [ 54.690900][ T5079] do_syscall_64+0x39/0xb0 [ 54.695302][ T5079] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 54.701184][ T5079] RIP: 0033:0x7f0159684b79 [ 54.705581][ T5079] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 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 [ 54.725168][ T5079] RSP: 002b:00007fffa4586f58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 54.733561][ T5079] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0159684b79 [ 54.741521][ T5079] RDX: 0000000020000700 RSI: 000000004004662b RDI: 0000000000000004 [ 54.749478][ T5079] RBP: 00007f0159648d20 R08: 0000000000000000 R09: 0000000000000000 [ 54.757543][ T5079] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0159648db0 ioctl(4, _IOC(_IOC_WRITE, 0x66, 0x2b, 0x4), 0x20000700) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 54.76