Warning: Permanently added '10.128.1.77' (ECDSA) to the list of known hosts. executing program [ 67.476843][ T3629] warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow [ 67.529511][ T3629] [ 67.541167][ T3629] ====================================================== [ 67.548204][ T3629] WARNING: possible circular locking dependency detected [ 67.555224][ T3629] 6.1.19-syzkaller #0 Not tainted [ 67.560234][ T3629] ------------------------------------------------------ [ 67.567250][ T3629] syz-executor269/3629 is trying to acquire lock: [ 67.573661][ T3629] ffff88814b87a170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2a8/0x370 [ 67.584141][ T3629] [ 67.584141][ T3629] but task is already holding lock: [ 67.591504][ T3629] ffff88814b878b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 67.602827][ T3629] [ 67.602827][ T3629] which lock already depends on the new lock. [ 67.602827][ T3629] [ 67.613229][ T3629] [ 67.613229][ T3629] the existing dependency chain (in reverse order) is: [ 67.622239][ T3629] [ 67.622239][ T3629] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 67.630674][ T3629] lock_acquire+0x23a/0x630 [ 67.635715][ T3629] percpu_down_write+0x50/0x2e0 [ 67.641217][ T3629] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 67.647828][ T3629] ext4_fileattr_set+0xe04/0x1770 [ 67.653433][ T3629] vfs_fileattr_set+0x8f3/0xd30 [ 67.658827][ T3629] do_vfs_ioctl+0x1cd1/0x2a90 [ 67.664041][ T3629] __se_sys_ioctl+0x81/0x160 [ 67.669160][ T3629] do_syscall_64+0x3d/0xb0 [ 67.674115][ T3629] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 67.680538][ T3629] [ 67.680538][ T3629] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 67.689070][ T3629] lock_acquire+0x23a/0x630 [ 67.694113][ T3629] down_write+0x36/0x60 [ 67.698798][ T3629] ext4_setattr+0xec7/0x1a00 [ 67.703922][ T3629] notify_change+0xdcd/0x1080 [ 67.709129][ T3629] do_truncate+0x21c/0x300 [ 67.714072][ T3629] do_sys_ftruncate+0x2e2/0x380 [ 67.719535][ T3629] do_syscall_64+0x3d/0xb0 [ 67.724477][ T3629] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 67.730916][ T3629] [ 67.730916][ T3629] -> #2 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 67.739533][ T3629] lock_acquire+0x23a/0x630 [ 67.744572][ T3629] down_read+0x39/0x50 [ 67.749164][ T3629] ext4_bmap+0x4b/0x410 [ 67.753862][ T3629] bmap+0xa1/0xd0 [ 67.758023][ T3629] jbd2_journal_flush+0x5b5/0xc40 [ 67.763572][ T3629] ext4_ioctl+0x3a9f/0x6220 [ 67.768604][ T3629] __se_sys_ioctl+0xf1/0x160 [ 67.773726][ T3629] do_syscall_64+0x3d/0xb0 [ 67.778666][ T3629] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 67.785094][ T3629] [ 67.785094][ T3629] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 67.793874][ T3629] lock_acquire+0x23a/0x630 [ 67.798911][ T3629] __mutex_lock_common+0x1d4/0x2520 [ 67.804641][ T3629] mutex_lock_io_nested+0x43/0x60 [ 67.810209][ T3629] jbd2_journal_flush+0x29b/0xc40 [ 67.815765][ T3629] ext4_ioctl+0x3a9f/0x6220 [ 67.820804][ T3629] __se_sys_ioctl+0xf1/0x160 [ 67.825932][ T3629] do_syscall_64+0x3d/0xb0 [ 67.830880][ T3629] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 67.837308][ T3629] [ 67.837308][ T3629] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 67.845319][ T3629] validate_chain+0x1667/0x58e0 [ 67.850716][ T3629] __lock_acquire+0x125b/0x1f80 [ 67.856188][ T3629] lock_acquire+0x23a/0x630 [ 67.861249][ T3629] __mutex_lock_common+0x1d4/0x2520 [ 67.866991][ T3629] mutex_lock_nested+0x17/0x20 [ 67.872305][ T3629] jbd2_journal_lock_updates+0x2a8/0x370 [ 67.878475][ T3629] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 67.885089][ T3629] ext4_fileattr_set+0xe04/0x1770 [ 67.890643][ T3629] vfs_fileattr_set+0x8f3/0xd30 [ 67.896028][ T3629] do_vfs_ioctl+0x1cd1/0x2a90 [ 67.901233][ T3629] __se_sys_ioctl+0x81/0x160 [ 67.906355][ T3629] do_syscall_64+0x3d/0xb0 [ 67.911325][ T3629] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 67.917756][ T3629] [ 67.917756][ T3629] other info that might help us debug this: [ 67.917756][ T3629] [ 67.927981][ T3629] Chain exists of: [ 67.927981][ T3629] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 67.927981][ T3629] [ 67.942845][ T3629] Possible unsafe locking scenario: [ 67.942845][ T3629] [ 67.950382][ T3629] CPU0 CPU1 [ 67.955767][ T3629] ---- ---- [ 67.961127][ T3629] lock(&sbi->s_writepages_rwsem); [ 67.966330][ T3629] lock(mapping.invalidate_lock); [ 67.974236][ T3629] lock(&sbi->s_writepages_rwsem); [ 67.981972][ T3629] lock(&journal->j_barrier); [ 67.986746][ T3629] [ 67.986746][ T3629] *** DEADLOCK *** [ 67.986746][ T3629] [ 67.994888][ T3629] 4 locks held by syz-executor269/3629: [ 68.000516][ T3629] #0: ffff88814b876460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 68.010208][ T3629] #1: ffff88807252a218 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 68.020943][ T3629] #2: ffff88807252a3b8 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 68.032614][ T3629] #3: ffff88814b878b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 68.044388][ T3629] [ 68.044388][ T3629] stack backtrace: [ 68.050296][ T3629] CPU: 1 PID: 3629 Comm: syz-executor269 Not tainted 6.1.19-syzkaller #0 [ 68.058729][ T3629] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 [ 68.068793][ T3629] Call Trace: [ 68.072076][ T3629] [ 68.075013][ T3629] dump_stack_lvl+0x1e3/0x2cb [ 68.079704][ T3629] ? nf_tcp_handle_invalid+0x642/0x642 [ 68.085180][ T3629] ? print_circular_bug+0x12b/0x1a0 [ 68.090395][ T3629] check_noncircular+0x2fa/0x3b0 [ 68.095357][ T3629] ? add_chain_block+0x850/0x850 [ 68.100298][ T3629] ? lockdep_lock+0x11f/0x2a0 [ 68.104993][ T3629] ? validate_chain+0x115/0x58e0 [ 68.109949][ T3629] ? noop_count+0x30/0x30 [ 68.114368][ T3629] ? _find_first_zero_bit+0xd0/0x100 [ 68.119677][ T3629] validate_chain+0x1667/0x58e0 [ 68.124543][ T3629] ? lockdep_unlock+0x165/0x300 [ 68.129494][ T3629] ? lockdep_unlock+0x165/0x300 [ 68.134445][ T3629] ? reacquire_held_locks+0x660/0x660 [ 68.139824][ T3629] ? validate_chain+0x13d1/0x58e0 [ 68.144855][ T3629] ? mark_lock+0x9a/0x340 [ 68.149191][ T3629] ? mark_lock+0x9a/0x340 [ 68.153541][ T3629] __lock_acquire+0x125b/0x1f80 [ 68.158415][ T3629] lock_acquire+0x23a/0x630 [ 68.162938][ T3629] ? jbd2_journal_lock_updates+0x2a8/0x370 [ 68.168759][ T3629] ? read_lock_is_recursive+0x10/0x10 [ 68.174165][ T3629] ? __might_sleep+0xb0/0xb0 [ 68.178763][ T3629] ? jbd2_journal_lock_updates+0x297/0x370 [ 68.184579][ T3629] ? rcu_read_lock_sched_held+0x89/0x130 [ 68.190229][ T3629] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 68.196223][ T3629] __mutex_lock_common+0x1d4/0x2520 [ 68.201431][ T3629] ? jbd2_journal_lock_updates+0x2a8/0x370 [ 68.207268][ T3629] ? jbd2_journal_lock_updates+0x2a8/0x370 [ 68.213089][ T3629] ? jbd2_journal_lock_updates+0x297/0x370 [ 68.218921][ T3629] ? mutex_lock_io_nested+0x60/0x60 [ 68.224134][ T3629] ? do_raw_read_unlock+0x70/0x70 [ 68.229163][ T3629] ? rcu_sync_func+0xaa/0x210 [ 68.233848][ T3629] mutex_lock_nested+0x17/0x20 [ 68.238625][ T3629] jbd2_journal_lock_updates+0x2a8/0x370 [ 68.244272][ T3629] ? jbd2_journal_wait_updates+0x2d0/0x2d0 [ 68.250086][ T3629] ? rcu_read_lock_sched_held+0x89/0x130 [ 68.255736][ T3629] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 68.261758][ T3629] ? percpu_down_write+0x2aa/0x2e0 [ 68.266883][ T3629] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 68.272979][ T3629] ext4_fileattr_set+0xe04/0x1770 [ 68.278024][ T3629] ? ext4_fileattr_get+0x200/0x200 [ 68.283146][ T3629] ? rwsem_write_trylock+0x166/0x210 [ 68.288446][ T3629] ? clear_nonspinnable+0x60/0x60 [ 68.293480][ T3629] ? memset+0x1f/0x40 [ 68.297465][ T3629] ? fileattr_fill_flags+0x1d0/0x300 [ 68.302760][ T3629] ? fscrypt_prepare_setflags+0x5d/0x220 [ 68.308396][ T3629] vfs_fileattr_set+0x8f3/0xd30 [ 68.313410][ T3629] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 68.318801][ T3629] ? rcu_read_lock_sched_held+0x89/0x130 [ 68.324454][ T3629] do_vfs_ioctl+0x1cd1/0x2a90 [ 68.330448][ T3629] ? __x64_compat_sys_ioctl+0x80/0x80 [ 68.335831][ T3629] ? __lock_acquire+0x1f80/0x1f80 [ 68.340868][ T3629] ? lockdep_hardirqs_on+0x94/0x130 [ 68.346082][ T3629] ? __kmem_cache_free+0x25c/0x3c0 [ 68.351201][ T3629] ? tomoyo_path_number_perm+0x5f4/0x7b0 [ 68.356840][ T3629] ? tomoyo_path_number_perm+0x657/0x7b0 [ 68.362481][ T3629] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 68.367957][ T3629] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 68.373969][ T3629] ? print_irqtrace_events+0x210/0x210 [ 68.379456][ T3629] ? print_irqtrace_events+0x210/0x210 [ 68.384953][ T3629] ? bpf_lsm_file_ioctl+0x5/0x10 [ 68.389916][ T3629] ? security_file_ioctl+0x7d/0xa0 [ 68.395048][ T3629] __se_sys_ioctl+0x81/0x160 [ 68.399652][ T3629] do_syscall_64+0x3d/0xb0 [ 68.404076][ T3629] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 68.409985][ T3629] RIP: 0033:0x7f2cc0d19049 [ 68.414403][ T3629] 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 [ 68.434018][ T3629] RSP: 002b:00007fffa259a308 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 68.442441][ T3629] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2cc0d19049 [ 68.450419][ T3629] RDX: 00000000200001c0 RSI: 0000000040086602 RDI: 0000000000000004 [ 68.458482][ T3629] RBP: 00007f2cc0cdd030 R08: 0000000000000000 R09: 0000000000000000 [ 68.466464][ T3629] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2cc0cdd0c0 [ 68.474442][ T3629] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 68.482440][