Warning: Permanently added '10.128.1.43' (ED25519) to the list of known hosts. executing program syzkaller login: [ 48.685537][ T3498] [ 48.689385][ T3498] ====================================================== [ 48.697757][ T3498] WARNING: possible circular locking dependency detected [ 48.707660][ T3498] 5.15.152-syzkaller #0 Not tainted [ 48.714384][ T3498] ------------------------------------------------------ [ 48.722547][ T3498] syz-executor413/3498 is trying to acquire lock: [ 48.731649][ T3498] ffff888024604170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2aa/0x370 [ 48.746832][ T3498] [ 48.746832][ T3498] but task is already holding lock: [ 48.755118][ T3498] ffff888024602bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 48.770146][ T3498] [ 48.770146][ T3498] which lock already depends on the new lock. [ 48.770146][ T3498] [ 48.787088][ T3498] [ 48.787088][ T3498] the existing dependency chain (in reverse order) is: [ 48.797739][ T3498] [ 48.797739][ T3498] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 48.807524][ T3498] lock_acquire+0x1db/0x4f0 [ 48.813613][ T3498] percpu_down_write+0x52/0x2d0 [ 48.822414][ T3498] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 48.830758][ T3498] ext4_fileattr_set+0xdf4/0x1750 [ 48.840040][ T3498] vfs_fileattr_set+0x8f3/0xd30 [ 48.849140][ T3498] do_vfs_ioctl+0x1d85/0x2b70 [ 48.855152][ T3498] __se_sys_ioctl+0x81/0x160 [ 48.863750][ T3498] do_syscall_64+0x3d/0xb0 [ 48.873259][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 48.881957][ T3498] [ 48.881957][ T3498] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 48.892611][ T3498] lock_acquire+0x1db/0x4f0 [ 48.900017][ T3498] down_write+0x97/0x170 [ 48.906398][ T3498] ext4_setattr+0xd6c/0x1990 [ 48.913089][ T3498] notify_change+0xc6d/0xf50 [ 48.920081][ T3498] do_truncate+0x21c/0x300 [ 48.925786][ T3498] do_sys_ftruncate+0x2eb/0x390 [ 48.932172][ T3498] do_syscall_64+0x3d/0xb0 [ 48.937551][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 48.945414][ T3498] [ 48.945414][ T3498] -> #2 (&sb->s_type->i_mutex_key#9){++++}-{3:3}: [ 48.956652][ T3498] lock_acquire+0x1db/0x4f0 [ 48.963486][ T3498] down_read+0x45/0x2e0 [ 48.969219][ T3498] ext4_bmap+0x4b/0x410 [ 48.976006][ T3498] bmap+0xa1/0xd0 [ 48.981379][ T3498] jbd2_journal_flush+0x7a2/0xc90 [ 48.987801][ T3498] ext4_ioctl+0x3249/0x5b80 [ 48.998187][ T3498] __se_sys_ioctl+0xf1/0x160 [ 49.004281][ T3498] do_syscall_64+0x3d/0xb0 [ 49.012153][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 49.021308][ T3498] [ 49.021308][ T3498] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 49.034014][ T3498] lock_acquire+0x1db/0x4f0 [ 49.039718][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 49.047567][ T3498] mutex_lock_io_nested+0x45/0x60 [ 49.054558][ T3498] jbd2_journal_flush+0x290/0xc90 [ 49.062754][ T3498] ext4_ioctl+0x3249/0x5b80 [ 49.068690][ T3498] __se_sys_ioctl+0xf1/0x160 [ 49.077277][ T3498] do_syscall_64+0x3d/0xb0 [ 49.084494][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 49.093036][ T3498] [ 49.093036][ T3498] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 49.103652][ T3498] validate_chain+0x1649/0x5930 [ 49.112936][ T3498] __lock_acquire+0x1295/0x1ff0 [ 49.118403][ T3498] lock_acquire+0x1db/0x4f0 [ 49.124292][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 49.131620][ T3498] mutex_lock_nested+0x17/0x20 [ 49.138636][ T3498] jbd2_journal_lock_updates+0x2aa/0x370 [ 49.146425][ T3498] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 49.156940][ T3498] ext4_fileattr_set+0xdf4/0x1750 [ 49.163191][ T3498] vfs_fileattr_set+0x8f3/0xd30 [ 49.173230][ T3498] do_vfs_ioctl+0x1d85/0x2b70 [ 49.178849][ T3498] __se_sys_ioctl+0x81/0x160 [ 49.186293][ T3498] do_syscall_64+0x3d/0xb0 [ 49.193966][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 49.204690][ T3498] [ 49.204690][ T3498] other info that might help us debug this: [ 49.204690][ T3498] [ 49.217556][ T3498] Chain exists of: [ 49.217556][ T3498] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 49.217556][ T3498] [ 49.237685][ T3498] Possible unsafe locking scenario: [ 49.237685][ T3498] [ 49.248393][ T3498] CPU0 CPU1 [ 49.258514][ T3498] ---- ---- [ 49.265576][ T3498] lock(&sbi->s_writepages_rwsem); [ 49.273047][ T3498] lock(mapping.invalidate_lock); [ 49.282195][ T3498] lock(&sbi->s_writepages_rwsem); [ 49.291024][ T3498] lock(&journal->j_barrier); [ 49.296784][ T3498] [ 49.296784][ T3498] *** DEADLOCK *** [ 49.296784][ T3498] [ 49.305888][ T3498] 4 locks held by syz-executor413/3498: [ 49.313292][ T3498] #0: ffff888024600460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 49.325357][ T3498] #1: ffff888071d38de8 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 49.339243][ T3498] #2: ffff888071d38f88 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 49.355328][ T3498] #3: ffff888024602bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 49.370182][ T3498] [ 49.370182][ T3498] stack backtrace: [ 49.378315][ T3498] CPU: 1 PID: 3498 Comm: syz-executor413 Not tainted 5.15.152-syzkaller #0 [ 49.390004][ T3498] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 [ 49.403430][ T3498] Call Trace: [ 49.406940][ T3498] [ 49.411080][ T3498] dump_stack_lvl+0x1e3/0x2cb [ 49.417207][ T3498] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 49.425674][ T3498] ? print_circular_bug+0x12b/0x1a0 [ 49.431867][ T3498] check_noncircular+0x2f8/0x3b0 [ 49.440534][ T3498] ? add_chain_block+0x850/0x850 [ 49.450164][ T3498] ? lockdep_lock+0x11f/0x2a0 [ 49.455844][ T3498] ? validate_chain+0x112/0x5930 [ 49.462882][ T3498] validate_chain+0x1649/0x5930 [ 49.471066][ T3498] ? reacquire_held_locks+0x660/0x660 [ 49.478033][ T3498] ? lockdep_unlock+0x166/0x300 [ 49.486367][ T3498] ? lockdep_lock+0x2a0/0x2a0 [ 49.492962][ T3498] ? lockdep_unlock+0x166/0x300 [ 49.500341][ T3498] ? reacquire_held_locks+0x660/0x660 [ 49.510533][ T3498] ? validate_chain+0x13bd/0x5930 [ 49.516953][ T3498] ? mark_lock+0x98/0x340 [ 49.522631][ T3498] ? mark_lock+0x98/0x340 [ 49.530799][ T3498] __lock_acquire+0x1295/0x1ff0 [ 49.536721][ T3498] lock_acquire+0x1db/0x4f0 [ 49.543755][ T3498] ? jbd2_journal_lock_updates+0x2aa/0x370 [ 49.553744][ T3498] ? read_lock_is_recursive+0x10/0x10 [ 49.564559][ T3498] ? __might_sleep+0xc0/0xc0 [ 49.570872][ T3498] ? print_irqtrace_events+0x210/0x210 [ 49.579405][ T3498] ? lockdep_hardirqs_off+0x70/0x100 [ 49.588107][ T3498] ? do_raw_spin_unlock+0x137/0x8b0 [ 49.594909][ T3498] __mutex_lock_common+0x1da/0x25a0 [ 49.603113][ T3498] ? jbd2_journal_lock_updates+0x2aa/0x370 [ 49.610265][ T3498] ? jbd2_journal_lock_updates+0x2aa/0x370 [ 49.617167][ T3498] ? jbd2_journal_lock_updates+0x299/0x370 [ 49.624563][ T3498] ? jbd2_journal_wait_updates+0x268/0x2d0 [ 49.632197][ T3498] ? mutex_lock_io_nested+0x60/0x60 [ 49.639476][ T3498] ? do_raw_read_unlock+0x70/0x70 [ 49.647005][ T3498] ? rcu_sync_func+0xaa/0x210 [ 49.652126][ T3498] mutex_lock_nested+0x17/0x20 [ 49.657860][ T3498] jbd2_journal_lock_updates+0x2aa/0x370 [ 49.665592][ T3498] ? jbd2_journal_wait_updates+0x2d0/0x2d0 [ 49.672200][ T3498] ? down_write+0x10e/0x170 [ 49.677681][ T3498] ? cpumask_next+0xc3/0xf0 [ 49.682797][ T3498] ? percpu_down_write+0x1ea/0x2d0 [ 49.689162][ T3498] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 49.696365][ T3498] ext4_fileattr_set+0xdf4/0x1750 [ 49.702122][ T3498] ? ext4_fileattr_get+0x200/0x200 [ 49.708542][ T3498] ? memset+0x1f/0x40 [ 49.713315][ T3498] ? fileattr_fill_flags+0x1d0/0x300 [ 49.721008][ T3498] ? fscrypt_prepare_setflags+0x5d/0x220 [ 49.729196][ T3498] vfs_fileattr_set+0x8f3/0xd30 [ 49.735210][ T3498] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 49.743066][ T3498] do_vfs_ioctl+0x1d85/0x2b70 [ 49.749358][ T3498] ? __x64_compat_sys_ioctl+0x80/0x80 [ 49.756171][ T3498] ? __lock_acquire+0x1ff0/0x1ff0 [ 49.762074][ T3498] ? slab_free_freelist_hook+0xdd/0x160 [ 49.768720][ T3498] ? tomoyo_path_number_perm+0x648/0x810 [ 49.777084][ T3498] ? kfree+0xf1/0x270 [ 49.782105][ T3498] ? tomoyo_path_number_perm+0x6ab/0x810 [ 49.789561][ T3498] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 49.796227][ T3498] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 49.803948][ T3498] ? print_irqtrace_events+0x210/0x210 [ 49.810300][ T3498] ? vtime_user_exit+0x2d1/0x400 [ 49.816139][ T3498] ? bpf_lsm_file_ioctl+0x5/0x10 [ 49.822313][ T3498] ? security_file_ioctl+0x7d/0xa0 [ 49.828266][ T3498] __se_sys_ioctl+0x81/0x160 [ 49.835373][ T3498] do_syscall_64+0x3d/0xb0 [ 49.840825][ T3498] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 49.847445][ T3498] RIP: 0033:0x7eff96e7e369 [ 49.852404][ T3498] 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 [ 49.878157][ T3498] RSP: 002b:00007fff9ff29028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 49.889411][ T3498] RAX: ffffffffffffffda RBX: 0073746e6576652e RCX: 00007eff96e7e369 [ 49.898209][ T3498] RDX: 0000000020000180 RSI: 0000000040086602 RDI: 0000000000000005 [ 49.909685][ T3498] RBP: 652e79726f6d656d R08: 00000000000ac5f8 R09: 00000000000ac5f8 [ 49.918637][ T3498] R10: 00000000000ac5f8 R11: 0000000000000246 R12: 0000000000000001 [ 49.930300][ T3498] R13: 00007fff9ff291f8 R14: 0000000000000001 R15: 0000000000000001 [ 49.942084][ T3498] <