Warning: Permanently added '10.128.10.43' (ECDSA) to the list of known hosts. executing program [ 40.011400][ T3591] warning: checkpointing journal with EXT4_IOC_CHECKPOINT_FLAG_ZEROOUT can be slow [ 40.047479][ T3591] [ 40.059053][ T3591] ====================================================== [ 40.066044][ T3591] WARNING: possible circular locking dependency detected [ 40.073049][ T3591] 5.15.98-syzkaller #0 Not tainted [ 40.078129][ T3591] ------------------------------------------------------ [ 40.085117][ T3591] syz-executor231/3591 is trying to acquire lock: [ 40.091499][ T3591] ffff88814b00a170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x4a9/0x580 [ 40.102023][ T3591] [ 40.102023][ T3591] but task is already holding lock: [ 40.109372][ T3591] ffff88814b008bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 40.120755][ T3591] [ 40.120755][ T3591] which lock already depends on the new lock. [ 40.120755][ T3591] [ 40.131133][ T3591] [ 40.131133][ T3591] the existing dependency chain (in reverse order) is: [ 40.140134][ T3591] [ 40.140134][ T3591] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 40.148533][ T3591] lock_acquire+0x1f6/0x560 [ 40.153543][ T3591] percpu_down_write+0x52/0x2d0 [ 40.158889][ T3591] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 40.165450][ T3591] ext4_fileattr_set+0xe6e/0x17d0 [ 40.170970][ T3591] vfs_fileattr_set+0x8ee/0xd30 [ 40.176315][ T3591] do_vfs_ioctl+0x1d85/0x2b70 [ 40.181498][ T3591] __se_sys_ioctl+0x81/0x160 [ 40.186591][ T3591] do_syscall_64+0x3d/0xb0 [ 40.191505][ T3591] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 40.197896][ T3591] [ 40.197896][ T3591] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 40.206206][ T3591] lock_acquire+0x1f6/0x560 [ 40.211213][ T3591] down_write+0x97/0x170 [ 40.215951][ T3591] ext4_setattr+0xdaa/0x1990 [ 40.221039][ T3591] notify_change+0xdad/0x1060 [ 40.226212][ T3591] do_truncate+0x217/0x300 [ 40.231126][ T3591] do_sys_ftruncate+0x2eb/0x390 [ 40.236479][ T3591] do_syscall_64+0x3d/0xb0 [ 40.241407][ T3591] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 40.247815][ T3591] [ 40.247815][ T3591] -> #2 (&sb->s_type->i_mutex_key#9){++++}-{3:3}: [ 40.256428][ T3591] lock_acquire+0x1f6/0x560 [ 40.261431][ T3591] down_read+0x3b/0x50 [ 40.265996][ T3591] ext4_bmap+0x4b/0x410 [ 40.270647][ T3591] bmap+0xa1/0xd0 [ 40.274777][ T3591] jbd2_journal_flush+0x7a2/0xc90 [ 40.280307][ T3591] ext4_ioctl+0x335b/0x5db0 [ 40.285323][ T3591] __se_sys_ioctl+0xf1/0x160 [ 40.290423][ T3591] do_syscall_64+0x3d/0xb0 [ 40.295352][ T3591] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 40.301847][ T3591] [ 40.301847][ T3591] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 40.310595][ T3591] lock_acquire+0x1f6/0x560 [ 40.315598][ T3591] __mutex_lock_common+0x1da/0x25a0 [ 40.321306][ T3591] mutex_lock_io_nested+0x45/0x60 [ 40.326824][ T3591] jbd2_journal_flush+0x290/0xc90 [ 40.332348][ T3591] ext4_ioctl+0x335b/0x5db0 [ 40.337359][ T3591] __se_sys_ioctl+0xf1/0x160 [ 40.342461][ T3591] do_syscall_64+0x3d/0xb0 [ 40.347383][ T3591] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 40.353770][ T3591] [ 40.353770][ T3591] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 40.361730][ T3591] validate_chain+0x1646/0x58b0 [ 40.367090][ T3591] __lock_acquire+0x1295/0x1ff0 [ 40.372437][ T3591] lock_acquire+0x1f6/0x560 [ 40.377447][ T3591] __mutex_lock_common+0x1da/0x25a0 [ 40.383141][ T3591] mutex_lock_nested+0x17/0x20 [ 40.388422][ T3591] jbd2_journal_lock_updates+0x4a9/0x580 [ 40.394563][ T3591] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 40.401136][ T3591] ext4_fileattr_set+0xe6e/0x17d0 [ 40.406677][ T3591] vfs_fileattr_set+0x8ee/0xd30 [ 40.412026][ T3591] do_vfs_ioctl+0x1d85/0x2b70 [ 40.417198][ T3591] __se_sys_ioctl+0x81/0x160 [ 40.422282][ T3591] do_syscall_64+0x3d/0xb0 [ 40.427194][ T3591] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 40.433581][ T3591] [ 40.433581][ T3591] other info that might help us debug this: [ 40.433581][ T3591] [ 40.443783][ T3591] Chain exists of: [ 40.443783][ T3591] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 40.443783][ T3591] [ 40.458615][ T3591] Possible unsafe locking scenario: [ 40.458615][ T3591] [ 40.466047][ T3591] CPU0 CPU1 [ 40.471406][ T3591] ---- ---- [ 40.476744][ T3591] lock(&sbi->s_writepages_rwsem); [ 40.481920][ T3591] lock(mapping.invalidate_lock); [ 40.489523][ T3591] lock(&sbi->s_writepages_rwsem); [ 40.497231][ T3591] lock(&journal->j_barrier); [ 40.501995][ T3591] [ 40.501995][ T3591] *** DEADLOCK *** [ 40.501995][ T3591] [ 40.510128][ T3591] 4 locks held by syz-executor231/3591: [ 40.515997][ T3591] #0: ffff88814b006460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 40.525626][ T3591] #1: ffff8880740203f0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 40.536291][ T3591] #2: ffff888074020590 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 40.547908][ T3591] #3: ffff88814b008bd8 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 40.559613][ T3591] [ 40.559613][ T3591] stack backtrace: [ 40.565477][ T3591] CPU: 1 PID: 3591 Comm: syz-executor231 Not tainted 5.15.98-syzkaller #0 [ 40.573948][ T3591] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023 [ 40.583979][ T3591] Call Trace: [ 40.587236][ T3591] [ 40.590149][ T3591] dump_stack_lvl+0x1e3/0x2cb [ 40.594803][ T3591] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 40.600416][ T3591] ? print_circular_bug+0x12b/0x1a0 [ 40.605611][ T3591] check_noncircular+0x2f8/0x3b0 [ 40.610525][ T3591] ? __switch_to_asm+0x34/0x60 [ 40.615285][ T3591] ? add_chain_block+0x850/0x850 [ 40.620199][ T3591] ? lockdep_lock+0x11f/0x2a0 [ 40.624869][ T3591] ? add_chain_block+0x850/0x850 [ 40.629785][ T3591] validate_chain+0x1646/0x58b0 [ 40.634634][ T3591] ? reacquire_held_locks+0x660/0x660 [ 40.639998][ T3591] ? reacquire_held_locks+0x660/0x660 [ 40.645346][ T3591] ? mark_lock+0x98/0x340 [ 40.649654][ T3591] __lock_acquire+0x1295/0x1ff0 [ 40.654486][ T3591] lock_acquire+0x1f6/0x560 [ 40.658968][ T3591] ? jbd2_journal_lock_updates+0x4a9/0x580 [ 40.664752][ T3591] ? read_lock_is_recursive+0x10/0x10 [ 40.670113][ T3591] ? __might_sleep+0xc0/0xc0 [ 40.674684][ T3591] ? rcu_read_lock_sched_held+0x89/0x130 [ 40.680305][ T3591] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 40.686272][ T3591] __mutex_lock_common+0x1da/0x25a0 [ 40.691452][ T3591] ? jbd2_journal_lock_updates+0x4a9/0x580 [ 40.697235][ T3591] ? jbd2_journal_lock_updates+0x496/0x580 [ 40.703015][ T3591] ? jbd2_journal_lock_updates+0x4a9/0x580 [ 40.708827][ T3591] ? mutex_lock_io_nested+0x60/0x60 [ 40.714007][ T3591] ? _raw_spin_unlock_irqrestore+0xd9/0x130 [ 40.719879][ T3591] ? _raw_spin_unlock+0x40/0x40 [ 40.724725][ T3591] ? finish_wait+0xc5/0x1d0 [ 40.729206][ T3591] mutex_lock_nested+0x17/0x20 [ 40.733959][ T3591] jbd2_journal_lock_updates+0x4a9/0x580 [ 40.739570][ T3591] ? jbd2_journal_restart+0x20/0x20 [ 40.744746][ T3591] ? init_wait_entry+0xd0/0xd0 [ 40.749490][ T3591] ? down_write+0x10e/0x170 [ 40.753991][ T3591] ? cpumask_next+0xc3/0xf0 [ 40.758485][ T3591] ? percpu_down_write+0x1ea/0x2d0 [ 40.763585][ T3591] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 40.769660][ T3591] ext4_fileattr_set+0xe6e/0x17d0 [ 40.774668][ T3591] ? ext4_fileattr_get+0x200/0x200 [ 40.779759][ T3591] ? memset+0x1f/0x40 [ 40.783720][ T3591] ? fileattr_fill_flags+0x1d0/0x300 [ 40.789001][ T3591] ? fscrypt_prepare_setflags+0x5d/0x220 [ 40.794615][ T3591] vfs_fileattr_set+0x8ee/0xd30 [ 40.799447][ T3591] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 40.804797][ T3591] ? rcu_read_lock_sched_held+0x89/0x130 [ 40.810415][ T3591] do_vfs_ioctl+0x1d85/0x2b70 [ 40.815069][ T3591] ? lockdep_hardirqs_on+0x94/0x130 [ 40.820243][ T3591] ? rcu_lock_release+0x5/0x20 [ 40.824983][ T3591] ? __x64_compat_sys_ioctl+0x80/0x80 [ 40.830329][ T3591] ? __lock_acquire+0x1ff0/0x1ff0 [ 40.835332][ T3591] ? slab_free_freelist_hook+0xdd/0x160 [ 40.840861][ T3591] ? tomoyo_path_number_perm+0x648/0x810 [ 40.846471][ T3591] ? kfree+0x10c/0x2d0 [ 40.850517][ T3591] ? tomoyo_path_number_perm+0x6ab/0x810 [ 40.856124][ T3591] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 40.861567][ T3591] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 40.867524][ T3591] ? print_irqtrace_events+0x210/0x210 [ 40.872981][ T3591] ? vtime_user_exit+0x2d1/0x400 [ 40.877910][ T3591] ? bpf_lsm_file_ioctl+0x5/0x10 [ 40.882831][ T3591] ? security_file_ioctl+0x7d/0xa0 [ 40.887924][ T3591] __se_sys_ioctl+0x81/0x160 [ 40.892497][ T3591] do_syscall_64+0x3d/0xb0 [ 40.896894][ T3591] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 40.902766][ T3591] RIP: 0033:0x7fefa1592069 [ 40.907175][ T3591] 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 [ 40.926757][ T3591] RSP: 002b:00007ffc696fe408 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 40.935164][ T3591] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fefa1592069 [ 40.943113][ T3591] RDX: 0000000020000000 RSI: 0000000040086602 RDI: 0000000000000004 [