Warning: Permanently added '10.128.0.64' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 51.041365][ T3504] warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow [ 51.130552][ T3504] [ 51.142148][ T3504] ====================================================== [ 51.149144][ T3504] WARNING: possible circular locking dependency detected [ 51.156139][ T3504] 5.15.118-syzkaller #0 Not tainted [ 51.161312][ T3504] ------------------------------------------------------ [ 51.168305][ T3504] syz-executor354/3504 is trying to acquire lock: [ 51.174696][ T3504] ffff88807ea6a170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x4a9/0x580 [ 51.185136][ T3504] [ 51.185136][ T3504] but task is already holding lock: [ 51.192484][ T3504] ffff88807ea68bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 51.203774][ T3504] [ 51.203774][ T3504] which lock already depends on the new lock. [ 51.203774][ T3504] [ 51.214155][ T3504] [ 51.214155][ T3504] the existing dependency chain (in reverse order) is: [ 51.223144][ T3504] [ 51.223144][ T3504] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 51.231549][ T3504] lock_acquire+0x1db/0x4f0 [ 51.236557][ T3504] percpu_down_write+0x52/0x2d0 [ 51.241912][ T3504] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 51.248481][ T3504] ext4_fileattr_set+0xdf4/0x1750 [ 51.254008][ T3504] vfs_fileattr_set+0x8f3/0xd30 [ 51.259359][ T3504] do_vfs_ioctl+0x1d85/0x2b70 [ 51.264540][ T3504] __se_sys_ioctl+0x81/0x160 [ 51.269668][ T3504] do_syscall_64+0x3d/0xb0 [ 51.274588][ T3504] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.280987][ T3504] [ 51.280987][ T3504] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 51.289305][ T3504] lock_acquire+0x1db/0x4f0 [ 51.294314][ T3504] down_write+0x97/0x170 [ 51.299147][ T3504] ext4_setattr+0xd6c/0x1990 [ 51.304245][ T3504] notify_change+0xd4d/0x1000 [ 51.309423][ T3504] do_truncate+0x21c/0x300 [ 51.314347][ T3504] do_sys_ftruncate+0x2eb/0x390 [ 51.319705][ T3504] do_syscall_64+0x3d/0xb0 [ 51.324626][ T3504] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.331046][ T3504] [ 51.331046][ T3504] -> #2 (&sb->s_type->i_mutex_key#9){++++}-{3:3}: [ 51.339629][ T3504] lock_acquire+0x1db/0x4f0 [ 51.344650][ T3504] down_read+0x45/0x2e0 [ 51.349308][ T3504] ext4_bmap+0x4b/0x410 [ 51.353968][ T3504] bmap+0xa1/0xd0 [ 51.358104][ T3504] jbd2_journal_flush+0x7a2/0xc90 [ 51.363628][ T3504] ext4_ioctl+0x322b/0x5b60 [ 51.368653][ T3504] __se_sys_ioctl+0xf1/0x160 [ 51.373745][ T3504] do_syscall_64+0x3d/0xb0 [ 51.378680][ T3504] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.385078][ T3504] [ 51.385078][ T3504] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 51.393835][ T3504] lock_acquire+0x1db/0x4f0 [ 51.398854][ T3504] __mutex_lock_common+0x1da/0x25a0 [ 51.404557][ T3504] mutex_lock_io_nested+0x45/0x60 [ 51.410083][ T3504] jbd2_journal_flush+0x290/0xc90 [ 51.415611][ T3504] ext4_ioctl+0x322b/0x5b60 [ 51.420622][ T3504] __se_sys_ioctl+0xf1/0x160 [ 51.425718][ T3504] do_syscall_64+0x3d/0xb0 [ 51.430644][ T3504] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.437041][ T3504] [ 51.437041][ T3504] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 51.445012][ T3504] validate_chain+0x1646/0x58b0 [ 51.450365][ T3504] __lock_acquire+0x1295/0x1ff0 [ 51.455723][ T3504] lock_acquire+0x1db/0x4f0 [ 51.460731][ T3504] __mutex_lock_common+0x1da/0x25a0 [ 51.466434][ T3504] mutex_lock_nested+0x17/0x20 [ 51.471701][ T3504] jbd2_journal_lock_updates+0x4a9/0x580 [ 51.477838][ T3504] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 51.484407][ T3504] ext4_fileattr_set+0xdf4/0x1750 [ 51.489935][ T3504] vfs_fileattr_set+0x8f3/0xd30 [ 51.495309][ T3504] do_vfs_ioctl+0x1d85/0x2b70 [ 51.500508][ T3504] __se_sys_ioctl+0x81/0x160 [ 51.505616][ T3504] do_syscall_64+0x3d/0xb0 [ 51.510543][ T3504] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.516946][ T3504] [ 51.516946][ T3504] other info that might help us debug this: [ 51.516946][ T3504] [ 51.527152][ T3504] Chain exists of: [ 51.527152][ T3504] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 51.527152][ T3504] [ 51.542000][ T3504] Possible unsafe locking scenario: [ 51.542000][ T3504] [ 51.549438][ T3504] CPU0 CPU1 [ 51.554784][ T3504] ---- ---- [ 51.560126][ T3504] lock(&sbi->s_writepages_rwsem); [ 51.565311][ T3504] lock(mapping.invalidate_lock); [ 51.572925][ T3504] lock(&sbi->s_writepages_rwsem); [ 51.580636][ T3504] lock(&journal->j_barrier); [ 51.585393][ T3504] [ 51.585393][ T3504] *** DEADLOCK *** [ 51.585393][ T3504] [ 51.593517][ T3504] 4 locks held by syz-executor354/3504: [ 51.599046][ T3504] #0: ffff88807ea66460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 51.608696][ T3504] #1: ffff888075f15da8 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 51.619384][ T3504] #2: ffff888075f15f48 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 51.631118][ T3504] #3: ffff88807ea68bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 51.642848][ T3504] [ 51.642848][ T3504] stack backtrace: [ 51.648713][ T3504] CPU: 1 PID: 3504 Comm: syz-executor354 Not tainted 5.15.118-syzkaller #0 [ 51.657277][ T3504] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 51.667316][ T3504] Call Trace: [ 51.670582][ T3504] [ 51.673500][ T3504] dump_stack_lvl+0x1e3/0x2cb [ 51.678169][ T3504] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 51.683787][ T3504] ? print_circular_bug+0x12b/0x1a0 [ 51.688980][ T3504] check_noncircular+0x2f8/0x3b0 [ 51.693901][ T3504] ? add_chain_block+0x850/0x850 [ 51.698820][ T3504] ? lockdep_lock+0x11f/0x2a0 [ 51.703485][ T3504] ? add_chain_block+0x850/0x850 [ 51.708406][ T3504] validate_chain+0x1646/0x58b0 [ 51.713250][ T3504] ? reacquire_held_locks+0x660/0x660 [ 51.718608][ T3504] ? reacquire_held_locks+0x660/0x660 [ 51.723966][ T3504] ? mark_lock+0x98/0x340 [ 51.728276][ T3504] __lock_acquire+0x1295/0x1ff0 [ 51.733115][ T3504] lock_acquire+0x1db/0x4f0 [ 51.737604][ T3504] ? jbd2_journal_lock_updates+0x4a9/0x580 [ 51.743397][ T3504] ? read_lock_is_recursive+0x10/0x10 [ 51.748750][ T3504] ? __might_sleep+0xc0/0xc0 [ 51.753326][ T3504] __mutex_lock_common+0x1da/0x25a0 [ 51.758509][ T3504] ? jbd2_journal_lock_updates+0x4a9/0x580 [ 51.764302][ T3504] ? jbd2_journal_lock_updates+0x4a9/0x580 [ 51.770091][ T3504] ? jbd2_journal_lock_updates+0x496/0x580 [ 51.775878][ T3504] ? do_raw_spin_unlock+0x137/0x8b0 [ 51.781058][ T3504] ? mutex_lock_io_nested+0x60/0x60 [ 51.786248][ T3504] ? _raw_spin_unlock_irqrestore+0xd9/0x130 [ 51.792126][ T3504] ? _raw_spin_unlock+0x40/0x40 [ 51.796960][ T3504] ? finish_wait+0xc5/0x1d0 [ 51.801478][ T3504] mutex_lock_nested+0x17/0x20 [ 51.806228][ T3504] jbd2_journal_lock_updates+0x4a9/0x580 [ 51.811846][ T3504] ? jbd2_journal_restart+0x20/0x20 [ 51.817030][ T3504] ? init_wait_entry+0xd0/0xd0 [ 51.821786][ T3504] ? down_write+0x10e/0x170 [ 51.826272][ T3504] ? cpumask_next+0xc3/0xf0 [ 51.830760][ T3504] ? percpu_down_write+0x1ea/0x2d0 [ 51.835858][ T3504] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 51.842008][ T3504] ext4_fileattr_set+0xdf4/0x1750 [ 51.847023][ T3504] ? ext4_fileattr_get+0x200/0x200 [ 51.852128][ T3504] ? memset+0x1f/0x40 [ 51.856087][ T3504] ? fileattr_fill_flags+0x1d0/0x300 [ 51.861355][ T3504] ? fscrypt_prepare_setflags+0x5d/0x220 [ 51.866987][ T3504] vfs_fileattr_set+0x8f3/0xd30 [ 51.871818][ T3504] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 51.877178][ T3504] do_vfs_ioctl+0x1d85/0x2b70 [ 51.881841][ T3504] ? __x64_compat_sys_ioctl+0x80/0x80 [ 51.887192][ T3504] ? __lock_acquire+0x1ff0/0x1ff0 [ 51.892196][ T3504] ? slab_free_freelist_hook+0xdd/0x160 [ 51.897723][ T3504] ? tomoyo_path_number_perm+0x648/0x810 [ 51.903336][ T3504] ? kfree+0xf1/0x270 [ 51.907301][ T3504] ? tomoyo_path_number_perm+0x6ab/0x810 [ 51.912919][ T3504] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 51.918371][ T3504] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 51.924330][ T3504] ? print_irqtrace_events+0x210/0x210 [ 51.929769][ T3504] ? vtime_user_exit+0x2d1/0x400 [ 51.934690][ T3504] ? bpf_lsm_file_ioctl+0x5/0x10 [ 51.939606][ T3504] ? security_file_ioctl+0x7d/0xa0 [ 51.944700][ T3504] __se_sys_ioctl+0x81/0x160 [ 51.949274][ T3504] do_syscall_64+0x3d/0xb0 [ 51.953680][ T3504] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 51.959578][ T3504] RIP: 0033:0x7f4192cca049 [ 51.963977][ T3504] 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 [ 51.983563][ T3504] RSP: 002b:00007ffc675dc8e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 51.991952][ T3504] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4192cca049 [ 51.999914][ T3504] RDX: 0000000020000380 RSI: 0000000040086602 RDI: 0000000000000004 [ 52.007877][ T3504] RBP: 00007f4192c8e030 R08: 0000000000000000 R09: 0000000000000000 [ 52.015836][ T3504] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4192c8e0c0 [ 52.023791][ T3504] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 52.031753][ T3504]