./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor1827244053 <...> Warning: Permanently added '10.128.0.136' (ECDSA) to the list of known hosts. execve("./syz-executor1827244053", ["./syz-executor1827244053"], 0x7fff6025ce20 /* 10 vars */) = 0 brk(NULL) = 0x555556117000 brk(0x555556117c40) = 0x555556117c40 arch_prctl(ARCH_SET_FS, 0x555556117300) = 0 uname({sysname="Linux", nodename="syzkaller", ...}) = 0 readlink("/proc/self/exe", "/root/syz-executor1827244053", 4096) = 28 brk(0x555556138c40) = 0x555556138c40 brk(0x555556139000) = 0x555556139000 mprotect(0x7fda90ec4000, 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: [ 52.672974][ T5080] [ 52.675324][ T5080] ====================================================== [ 52.682321][ T5080] WARNING: possible circular locking dependency detected [ 52.689317][ T5080] 6.2.0-syzkaller-12923-g0194b64578e9 #0 Not tainted [ 52.695968][ T5080] ------------------------------------------------------ [ 52.702976][ T5080] syz-executor182/5080 is trying to acquire lock: [ 52.709455][ T5080] ffff888022df0400 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: ext4_bmap+0x52/0x470 [ 52.719034][ T5080] [ 52.719034][ T5080] but task is already holding lock: [ 52.726380][ T5080] ffff88814be623f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x47f/0xc90 [ 52.736983][ T5080] [ 52.736983][ T5080] which lock already depends on the new lock. [ 52.736983][ T5080] [ 52.747364][ T5080] [ 52.747364][ T5080] the existing dependency chain (in reverse order) is: [ 52.756354][ T5080] [ 52.756354][ T5080] -> #3 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 52.765104][ T5080] mutex_lock_io_nested+0x143/0x11a0 [ 52.770915][ T5080] jbd2_journal_flush+0x19e/0xc90 [ 52.776458][ T5080] __ext4_ioctl+0xb3f/0x4c90 [ 52.781570][ T5080] __x64_sys_ioctl+0x197/0x210 [ 52.786846][ T5080] do_syscall_64+0x39/0xb0 [ 52.791774][ T5080] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 52.798267][ T5080] [ 52.798267][ T5080] -> #2 (&journal->j_barrier){+.+.}-{3:3}: [ 52.806237][ T5080] __mutex_lock+0x12f/0x1350 [ 52.811349][ T5080] jbd2_journal_lock_updates+0x162/0x310 [ 52.817516][ T5080] ext4_change_inode_journal_flag+0x188/0x550 [ 52.824093][ T5080] ext4_fileattr_set+0xe78/0x1a50 [ 52.829626][ T5080] vfs_fileattr_set+0x7ff/0xc40 [ 52.834981][ T5080] do_vfs_ioctl+0xfa8/0x1670 [ 52.840071][ T5080] __x64_sys_ioctl+0x10c/0x210 [ 52.845334][ T5080] do_syscall_64+0x39/0xb0 [ 52.850252][ T5080] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 52.856657][ T5080] [ 52.856657][ T5080] -> #1 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 52.865061][ T5080] percpu_down_write+0x53/0x390 [ 52.870419][ T5080] ext4_ind_migrate+0x23b/0x860 [ 52.875784][ T5080] ext4_fileattr_set+0x1582/0x1a50 [ 52.881405][ T5080] vfs_fileattr_set+0x7ff/0xc40 [ 52.886846][ T5080] do_vfs_ioctl+0xfa8/0x1670 [ 52.892042][ T5080] __x64_sys_ioctl+0x10c/0x210 [ 52.897307][ T5080] do_syscall_64+0x39/0xb0 [ 52.902242][ T5080] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 52.908665][ T5080] [ 52.908665][ T5080] -> #0 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 52.917335][ T5080] __lock_acquire+0x2ec7/0x5d40 [ 52.922697][ T5080] lock_acquire+0x1e3/0x670 [ 52.927733][ T5080] down_read+0x3d/0x50 [ 52.932314][ T5080] ext4_bmap+0x52/0x470 [ 52.936976][ T5080] bmap+0xae/0x120 [ 52.941293][ T5080] jbd2_journal_bmap+0xac/0x1c0 [ 52.946671][ T5080] jbd2_journal_flush+0x87b/0xc90 [ 52.952285][ T5080] __ext4_ioctl+0xb3f/0x4c90 [ 52.957413][ T5080] __x64_sys_ioctl+0x197/0x210 [ 52.962693][ T5080] do_syscall_64+0x39/0xb0 [ 52.967620][ T5080] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 52.974725][ T5080] [ 52.974725][ T5080] other info that might help us debug this: [ 52.974725][ T5080] [ 52.985028][ T5080] Chain exists of: [ 52.985028][ T5080] &sb->s_type->i_mutex_key#8 --> &journal->j_barrier --> &journal->j_checkpoint_mutex [ 52.985028][ T5080] [ 53.000733][ T5080] Possible unsafe locking scenario: [ 53.000733][ T5080] [ 53.008358][ T5080] CPU0 CPU1 [ 53.013711][ T5080] ---- ---- [ 53.019099][ T5080] lock(&journal->j_checkpoint_mutex); [ 53.024629][ T5080] lock(&journal->j_barrier); [ 53.031897][ T5080] lock(&journal->j_checkpoint_mutex); [ 53.039950][ T5080] lock(&sb->s_type->i_mutex_key#8); [ 53.045393][ T5080] [ 53.045393][ T5080] *** DEADLOCK *** [ 53.045393][ T5080] [ 53.053518][ T5080] 2 locks held by syz-executor182/5080: [ 53.059041][ T5080] #0: ffff88814be62170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x162/0x310 [ 53.069898][ T5080] #1: ffff88814be623f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x47f/0xc90 [ 53.080925][ T5080] [ 53.080925][ T5080] stack backtrace: [ 53.086792][ T5080] CPU: 1 PID: 5080 Comm: syz-executor182 Not tainted 6.2.0-syzkaller-12923-g0194b64578e9 #0 [ 53.096835][ T5080] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 [ 53.106871][ T5080] Call Trace: [ 53.110138][ T5080] [ 53.113064][ T5080] dump_stack_lvl+0xd9/0x150 [ 53.117649][ T5080] check_noncircular+0x25f/0x2e0 [ 53.122584][ T5080] ? print_circular_bug+0x5c0/0x5c0 [ 53.127768][ T5080] ? __switch_to+0x5d0/0x1110 [ 53.132429][ T5080] ? mark_lock.part.0+0xee/0x1970 [ 53.137444][ T5080] ? print_usage_bug.part.0+0x660/0x660 [ 53.142976][ T5080] __lock_acquire+0x2ec7/0x5d40 [ 53.147813][ T5080] ? __wait_on_bit+0xd4/0x180 [ 53.152499][ T5080] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 53.158468][ T5080] lock_acquire+0x1e3/0x670 [ 53.162954][ T5080] ? ext4_bmap+0x52/0x470 [ 53.167271][ T5080] ? out_of_line_wait_on_bit_timeout+0x170/0x170 [ 53.173589][ T5080] ? lock_release+0x780/0x780 [ 53.178259][ T5080] down_read+0x3d/0x50 [ 53.182317][ T5080] ? ext4_bmap+0x52/0x470 [ 53.186632][ T5080] ext4_bmap+0x52/0x470 [ 53.190792][ T5080] ? mpage_release_unused_pages+0x870/0x870 [ 53.196670][ T5080] bmap+0xae/0x120 [ 53.200378][ T5080] ? do_raw_read_unlock+0xe0/0xe0 [ 53.205390][ T5080] jbd2_journal_bmap+0xac/0x1c0 [ 53.210232][ T5080] ? jbd2_log_start_commit+0x50/0x50 [ 53.215504][ T5080] ? _raw_write_unlock+0x28/0x40 [ 53.220426][ T5080] ? jbd2_mark_journal_empty+0x307/0x3f0 [ 53.226137][ T5080] jbd2_journal_flush+0x87b/0xc90 [ 53.231165][ T5080] ? apparmor_capable+0x1dc/0x460 [ 53.236199][ T5080] ? jbd2_fc_get_buf+0x310/0x310 [ 53.241120][ T5080] ? bpf_lsm_capable+0x9/0x10 [ 53.245803][ T5080] ? security_capable+0x93/0xc0 [ 53.250638][ T5080] __ext4_ioctl+0xb3f/0x4c90 [ 53.255223][ T5080] ? tomoyo_path_number_perm+0x166/0x570 [ 53.260866][ T5080] ? ext4_reset_inode_seed+0x450/0x450 [ 53.266314][ T5080] ? __sanitizer_cov_trace_switch+0x54/0x90 [ 53.272209][ T5080] ? do_vfs_ioctl+0x132/0x1670 [ 53.276957][ T5080] ? vfs_fileattr_set+0xc40/0xc40 [ 53.281965][ T5080] ? find_held_lock+0x2d/0x110 [ 53.286711][ T5080] ? put_page+0x2/0x280 [ 53.290861][ T5080] ? ext4_fileattr_set+0x1a50/0x1a50 [ 53.296227][ T5080] __x64_sys_ioctl+0x197/0x210 [ 53.300977][ T5080] do_syscall_64+0x39/0xb0 [ 53.305386][ T5080] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 53.311272][ T5080] RIP: 0033:0x7fda90e57b79 [ 53.315782][ T5080] 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 [ 53.335463][ T5080] RSP: 002b:00007ffff81b3bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 53.343857][ T5080] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fda90e57b79 [ 53.351818][ T5080] RDX: 0000000020000700 RSI: 000000004004662b RDI: 0000000000000004 [ 53.359865][ T5080] RBP: 00007fda90e1bd20 R08: 0000000000000000 R09: 0000000000000000 [ 53.367904][ T5080] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fda90e1bdb0 ioctl(4, _IOC(_IOC_WRITE, 0x66, 0x2b, 0x4), 0x20000700) = 0 exit_group(0) = ? +++ exited with 0 +++ [ 5