Warning: Permanently added '10.128.1.170' (ED25519) to the list of known hosts. executing program [ 49.170176][ T3543] [ 49.172510][ T3543] ====================================================== [ 49.179505][ T3543] WARNING: possible circular locking dependency detected [ 49.186500][ T3543] 6.1.55-syzkaller #0 Not tainted [ 49.191499][ T3543] ------------------------------------------------------ [ 49.198493][ T3543] syz-executor373/3543 is trying to acquire lock: [ 49.204881][ T3543] ffff88814c012170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2b0/0x380 [ 49.215316][ T3543] [ 49.215316][ T3543] but task is already holding lock: [ 49.222658][ T3543] ffff88814c010b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 49.233953][ T3543] [ 49.233953][ T3543] which lock already depends on the new lock. [ 49.233953][ T3543] [ 49.244340][ T3543] [ 49.244340][ T3543] the existing dependency chain (in reverse order) is: [ 49.253333][ T3543] [ 49.253333][ T3543] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 49.261744][ T3543] lock_acquire+0x1f8/0x5a0 [ 49.266766][ T3543] percpu_down_write+0x50/0x2f0 [ 49.272134][ T3543] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 49.278711][ T3543] ext4_fileattr_set+0xe04/0x1770 [ 49.284242][ T3543] vfs_fileattr_set+0x8f3/0xd30 [ 49.289598][ T3543] do_vfs_ioctl+0x1cd1/0x2a90 [ 49.294784][ T3543] __se_sys_ioctl+0x81/0x160 [ 49.299882][ T3543] do_syscall_64+0x3d/0xb0 [ 49.304806][ T3543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 49.311204][ T3543] [ 49.311204][ T3543] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 49.319527][ T3543] lock_acquire+0x1f8/0x5a0 [ 49.324539][ T3543] down_write+0x36/0x60 [ 49.329202][ T3543] ext4_setattr+0xec7/0x1a00 [ 49.334295][ T3543] notify_change+0xce3/0xfc0 [ 49.339406][ T3543] do_truncate+0x21c/0x300 [ 49.344335][ T3543] do_sys_ftruncate+0x2e2/0x380 [ 49.349693][ T3543] do_syscall_64+0x3d/0xb0 [ 49.354616][ T3543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 49.361018][ T3543] [ 49.361018][ T3543] -> #2 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 49.369606][ T3543] lock_acquire+0x1f8/0x5a0 [ 49.374618][ T3543] down_read+0xad/0xa30 [ 49.379284][ T3543] ext4_bmap+0x4b/0x410 [ 49.383947][ T3543] bmap+0xa1/0xd0 [ 49.388090][ T3543] jbd2_journal_flush+0x5b5/0xc40 [ 49.393624][ T3543] ext4_ioctl+0x3986/0x5f60 [ 49.398635][ T3543] __se_sys_ioctl+0xf1/0x160 [ 49.403736][ T3543] do_syscall_64+0x3d/0xb0 [ 49.408665][ T3543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 49.415063][ T3543] [ 49.415063][ T3543] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 49.423823][ T3543] lock_acquire+0x1f8/0x5a0 [ 49.428834][ T3543] mutex_lock_io_nested+0x134/0xab0 [ 49.434538][ T3543] jbd2_journal_flush+0x29b/0xc40 [ 49.440069][ T3543] ext4_ioctl+0x3986/0x5f60 [ 49.445078][ T3543] __se_sys_ioctl+0xf1/0x160 [ 49.450173][ T3543] do_syscall_64+0x3d/0xb0 [ 49.455107][ T3543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 49.461514][ T3543] [ 49.461514][ T3543] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 49.469489][ T3543] validate_chain+0x1667/0x58e0 [ 49.474849][ T3543] __lock_acquire+0x125b/0x1f80 [ 49.480215][ T3543] lock_acquire+0x1f8/0x5a0 [ 49.485223][ T3543] __mutex_lock+0x132/0xd80 [ 49.490232][ T3543] jbd2_journal_lock_updates+0x2b0/0x380 [ 49.496371][ T3543] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 49.502945][ T3543] ext4_fileattr_set+0xe04/0x1770 [ 49.508476][ T3543] vfs_fileattr_set+0x8f3/0xd30 [ 49.513833][ T3543] do_vfs_ioctl+0x1cd1/0x2a90 [ 49.519021][ T3543] __se_sys_ioctl+0x81/0x160 [ 49.524118][ T3543] do_syscall_64+0x3d/0xb0 [ 49.529043][ T3543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 49.535441][ T3543] [ 49.535441][ T3543] other info that might help us debug this: [ 49.535441][ T3543] [ 49.545648][ T3543] Chain exists of: [ 49.545648][ T3543] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 49.545648][ T3543] [ 49.560485][ T3543] Possible unsafe locking scenario: [ 49.560485][ T3543] [ 49.567912][ T3543] CPU0 CPU1 [ 49.573256][ T3543] ---- ---- [ 49.578603][ T3543] lock(&sbi->s_writepages_rwsem); [ 49.583783][ T3543] lock(mapping.invalidate_lock); [ 49.591395][ T3543] lock(&sbi->s_writepages_rwsem); [ 49.599094][ T3543] lock(&journal->j_barrier); [ 49.603844][ T3543] [ 49.603844][ T3543] *** DEADLOCK *** [ 49.603844][ T3543] [ 49.611979][ T3543] 4 locks held by syz-executor373/3543: [ 49.617508][ T3543] #0: ffff88814c00e460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 49.627158][ T3543] #1: ffff88804bbde850 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 49.637848][ T3543] #2: ffff88804bbde9f0 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 49.649488][ T3543] #3: ffff88814c010b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 49.661212][ T3543] [ 49.661212][ T3543] stack backtrace: [ 49.667084][ T3543] CPU: 1 PID: 3543 Comm: syz-executor373 Not tainted 6.1.55-syzkaller #0 [ 49.675478][ T3543] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 [ 49.685514][ T3543] Call Trace: [ 49.688779][ T3543] [ 49.691695][ T3543] dump_stack_lvl+0x1e3/0x2cb [ 49.696365][ T3543] ? nf_tcp_handle_invalid+0x642/0x642 [ 49.701815][ T3543] ? print_circular_bug+0x12b/0x1a0 [ 49.707004][ T3543] check_noncircular+0x2fa/0x3b0 [ 49.711928][ T3543] ? lockdep_lock+0x2a0/0x2a0 [ 49.716591][ T3543] ? add_chain_block+0x850/0x850 [ 49.721514][ T3543] ? lockdep_lock+0x11f/0x2a0 [ 49.726180][ T3543] ? validate_chain+0x115/0x58e0 [ 49.731107][ T3543] ? _find_first_zero_bit+0xd0/0x100 [ 49.736380][ T3543] validate_chain+0x1667/0x58e0 [ 49.741225][ T3543] ? lockdep_unlock+0x165/0x300 [ 49.746066][ T3543] ? reacquire_held_locks+0x660/0x660 [ 49.751429][ T3543] ? validate_chain+0x13d1/0x58e0 [ 49.756447][ T3543] ? mark_lock+0x9a/0x340 [ 49.760766][ T3543] ? __lock_acquire+0x125b/0x1f80 [ 49.765780][ T3543] ? mark_lock+0x9a/0x340 [ 49.770099][ T3543] __lock_acquire+0x125b/0x1f80 [ 49.774943][ T3543] lock_acquire+0x1f8/0x5a0 [ 49.779434][ T3543] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 49.785226][ T3543] ? read_lock_is_recursive+0x10/0x10 [ 49.790584][ T3543] ? __might_sleep+0xb0/0xb0 [ 49.795157][ T3543] ? do_raw_spin_unlock+0x137/0x8a0 [ 49.800344][ T3543] ? lockdep_hardirqs_on+0x94/0x130 [ 49.805526][ T3543] __mutex_lock+0x132/0xd80 [ 49.810017][ T3543] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 49.815808][ T3543] ? jbd2_journal_lock_updates+0x29f/0x380 [ 49.821599][ T3543] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 49.827387][ T3543] ? __lock_acquire+0x1f80/0x1f80 [ 49.832396][ T3543] ? mutex_lock_nested+0x10/0x10 [ 49.837322][ T3543] ? do_raw_read_unlock+0x70/0x70 [ 49.842337][ T3543] ? rcu_sync_enter+0x202/0x340 [ 49.847176][ T3543] jbd2_journal_lock_updates+0x2b0/0x380 [ 49.852795][ T3543] ? jbd2_journal_wait_updates+0x2d0/0x2d0 [ 49.858583][ T3543] ? rcu_is_watching+0x11/0xb0 [ 49.863337][ T3543] ? _find_next_bit+0x11b/0x120 [ 49.868176][ T3543] ? percpu_down_write+0x2b7/0x2f0 [ 49.873268][ T3543] ? rcu_is_watching+0x11/0xb0 [ 49.878022][ T3543] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 49.884078][ T3543] ext4_fileattr_set+0xe04/0x1770 [ 49.889094][ T3543] ? ext4_fileattr_get+0x200/0x200 [ 49.894191][ T3543] ? rwsem_write_trylock+0x166/0x210 [ 49.899465][ T3543] ? clear_nonspinnable+0x60/0x60 [ 49.904484][ T3543] ? memset+0x1f/0x40 [ 49.908450][ T3543] ? fileattr_fill_flags+0x1d0/0x300 [ 49.913725][ T3543] ? fscrypt_prepare_setflags+0x5d/0x220 [ 49.919347][ T3543] vfs_fileattr_set+0x8f3/0xd30 [ 49.924190][ T3543] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 49.929555][ T3543] do_vfs_ioctl+0x1cd1/0x2a90 [ 49.934223][ T3543] ? __x64_compat_sys_ioctl+0x80/0x80 [ 49.939582][ T3543] ? __lock_acquire+0x1f80/0x1f80 [ 49.944592][ T3543] ? lockdep_hardirqs_on+0x94/0x130 [ 49.949775][ T3543] ? __kmem_cache_free+0x25c/0x3c0 [ 49.954872][ T3543] ? tomoyo_path_number_perm+0x61b/0x7f0 [ 49.960493][ T3543] ? tomoyo_path_number_perm+0x68a/0x7f0 [ 49.966113][ T3543] ? tomoyo_path_number_perm+0x1f2/0x7f0 [ 49.971731][ T3543] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 49.977177][ T3543] ? lockdep_hardirqs_on+0x94/0x130 [ 49.982358][ T3543] ? kmem_cache_free+0x292/0x510 [ 49.987290][ T3543] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 49.993269][ T3543] ? print_irqtrace_events+0x210/0x210 [ 49.998723][ T3543] ? print_irqtrace_events+0x210/0x210 [ 50.004172][ T3543] ? bpf_lsm_file_ioctl+0x5/0x10 [ 50.009090][ T3543] ? security_file_ioctl+0x7d/0xa0 [ 50.014190][ T3543] __se_sys_ioctl+0x81/0x160 [ 50.018770][ T3543] do_syscall_64+0x3d/0xb0 [ 50.023178][ T3543] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 50.029059][ T3543] RIP: 0033:0x7feeb8351369 [ 50.033458][ T3543] Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 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 b8 ff ff ff f7 d8 64 89 01 48 [ 50.053045][ T3543] RSP: 002b:00007ffef545a7f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 50.061441][ T3543] RAX: ffffffffffffffda RBX: 00007ffef545a9c8 RCX: 00007feeb8351369 [ 50.069397][ T3543] RDX: 0000000020000180 RSI: 0000000