Warning: Permanently added '10.128.1.148' (ED25519) to the list of known hosts. executing program [ 56.346161][ T3549] [ 56.348520][ T3549] ====================================================== [ 56.355536][ T3549] WARNING: possible circular locking dependency detected [ 56.362547][ T3549] 6.1.71-syzkaller #0 Not tainted [ 56.367559][ T3549] ------------------------------------------------------ [ 56.374567][ T3549] syz-executor143/3549 is trying to acquire lock: [ 56.380972][ T3549] ffff88814bbce170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2b0/0x380 [ 56.391434][ T3549] [ 56.391434][ T3549] but task is already holding lock: [ 56.398792][ T3549] ffff88814bbccb98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 56.410110][ T3549] [ 56.410110][ T3549] which lock already depends on the new lock. [ 56.410110][ T3549] [ 56.420512][ T3549] [ 56.420512][ T3549] the existing dependency chain (in reverse order) is: [ 56.429541][ T3549] [ 56.429541][ T3549] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 56.437970][ T3549] lock_acquire+0x1f8/0x5a0 [ 56.443002][ T3549] percpu_down_write+0x50/0x2f0 [ 56.448387][ T3549] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 56.454986][ T3549] ext4_fileattr_set+0xe04/0x1770 [ 56.460529][ T3549] vfs_fileattr_set+0x8f3/0xd30 [ 56.465926][ T3549] do_vfs_ioctl+0x1cd1/0x2a90 [ 56.471132][ T3549] __se_sys_ioctl+0x81/0x160 [ 56.476243][ T3549] do_syscall_64+0x3d/0xb0 [ 56.481191][ T3549] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 56.487603][ T3549] [ 56.487603][ T3549] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 56.495935][ T3549] lock_acquire+0x1f8/0x5a0 [ 56.500967][ T3549] down_write+0x36/0x60 [ 56.505634][ T3549] ext4_setattr+0xec7/0x1a00 [ 56.510752][ T3549] notify_change+0xce3/0xfc0 [ 56.515864][ T3549] do_truncate+0x21c/0x300 [ 56.520796][ T3549] do_sys_ftruncate+0x2e2/0x380 [ 56.526165][ T3549] do_syscall_64+0x3d/0xb0 [ 56.531101][ T3549] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 56.537508][ T3549] [ 56.537508][ T3549] -> #2 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 56.546105][ T3549] lock_acquire+0x1f8/0x5a0 [ 56.551125][ T3549] down_read+0xad/0xa30 [ 56.555819][ T3549] ext4_bmap+0x4b/0x410 [ 56.560503][ T3549] bmap+0xa1/0xd0 [ 56.564667][ T3549] jbd2_journal_flush+0x5b5/0xc40 [ 56.570234][ T3549] ext4_ioctl+0x3986/0x5f60 [ 56.575301][ T3549] __se_sys_ioctl+0xf1/0x160 [ 56.580424][ T3549] do_syscall_64+0x3d/0xb0 [ 56.585364][ T3549] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 56.591784][ T3549] [ 56.591784][ T3549] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 56.600558][ T3549] lock_acquire+0x1f8/0x5a0 [ 56.605600][ T3549] mutex_lock_io_nested+0x134/0xab0 [ 56.611318][ T3549] jbd2_journal_flush+0x29b/0xc40 [ 56.616859][ T3549] ext4_ioctl+0x3986/0x5f60 [ 56.621885][ T3549] __se_sys_ioctl+0xf1/0x160 [ 56.627000][ T3549] do_syscall_64+0x3d/0xb0 [ 56.631934][ T3549] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 56.638347][ T3549] [ 56.638347][ T3549] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 56.646334][ T3549] validate_chain+0x1661/0x5950 [ 56.651705][ T3549] __lock_acquire+0x125b/0x1f80 [ 56.657076][ T3549] lock_acquire+0x1f8/0x5a0 [ 56.662267][ T3549] __mutex_lock+0x132/0xd80 [ 56.667302][ T3549] jbd2_journal_lock_updates+0x2b0/0x380 [ 56.673483][ T3549] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 56.680081][ T3549] ext4_fileattr_set+0xe04/0x1770 [ 56.685640][ T3549] vfs_fileattr_set+0x8f3/0xd30 [ 56.691015][ T3549] do_vfs_ioctl+0x1cd1/0x2a90 [ 56.696219][ T3549] __se_sys_ioctl+0x81/0x160 [ 56.701346][ T3549] do_syscall_64+0x3d/0xb0 [ 56.706299][ T3549] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 56.712759][ T3549] [ 56.712759][ T3549] other info that might help us debug this: [ 56.712759][ T3549] [ 56.722981][ T3549] Chain exists of: [ 56.722981][ T3549] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 56.722981][ T3549] [ 56.737861][ T3549] Possible unsafe locking scenario: [ 56.737861][ T3549] [ 56.745342][ T3549] CPU0 CPU1 [ 56.750712][ T3549] ---- ---- [ 56.756068][ T3549] lock(&sbi->s_writepages_rwsem); [ 56.761267][ T3549] lock(mapping.invalidate_lock); [ 56.768899][ T3549] lock(&sbi->s_writepages_rwsem); [ 56.776612][ T3549] lock(&journal->j_barrier); [ 56.781371][ T3549] [ 56.781371][ T3549] *** DEADLOCK *** [ 56.781371][ T3549] [ 56.789600][ T3549] 4 locks held by syz-executor143/3549: [ 56.795147][ T3549] #0: ffff88814bbca460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 56.804817][ T3549] #1: ffff888072b58e08 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 56.815534][ T3549] #2: ffff888072b58fa8 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 56.827208][ T3549] #3: ffff88814bbccb98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 56.838974][ T3549] [ 56.838974][ T3549] stack backtrace: [ 56.844870][ T3549] CPU: 1 PID: 3549 Comm: syz-executor143 Not tainted 6.1.71-syzkaller #0 [ 56.853413][ T3549] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 [ 56.863478][ T3549] Call Trace: [ 56.866754][ T3549] [ 56.869682][ T3549] dump_stack_lvl+0x1e3/0x2cb [ 56.874386][ T3549] ? nf_tcp_handle_invalid+0x642/0x642 [ 56.879857][ T3549] ? print_circular_bug+0x12b/0x1a0 [ 56.885052][ T3549] check_noncircular+0x2fa/0x3b0 [ 56.889996][ T3549] ? lockdep_lock+0x2a0/0x2a0 [ 56.894685][ T3549] ? add_chain_block+0x850/0x850 [ 56.899631][ T3549] ? lockdep_lock+0x11f/0x2a0 [ 56.904318][ T3549] ? validate_chain+0x112/0x5950 [ 56.909271][ T3549] ? _find_first_zero_bit+0xd0/0x100 [ 56.914561][ T3549] validate_chain+0x1661/0x5950 [ 56.919426][ T3549] ? reacquire_held_locks+0x660/0x660 [ 56.924800][ T3549] ? validate_chain+0x13ce/0x5950 [ 56.929839][ T3549] ? mark_lock+0x9a/0x340 [ 56.934172][ T3549] ? __lock_acquire+0x125b/0x1f80 [ 56.939198][ T3549] ? mark_lock+0x9a/0x340 [ 56.943543][ T3549] __lock_acquire+0x125b/0x1f80 [ 56.948396][ T3549] lock_acquire+0x1f8/0x5a0 [ 56.952901][ T3549] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 56.958709][ T3549] ? read_lock_is_recursive+0x10/0x10 [ 56.964098][ T3549] ? __might_sleep+0xb0/0xb0 [ 56.968682][ T3549] ? do_raw_spin_unlock+0x137/0x8a0 [ 56.973872][ T3549] ? lockdep_hardirqs_on+0x94/0x130 [ 56.979070][ T3549] __mutex_lock+0x132/0xd80 [ 56.983591][ T3549] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 56.989405][ T3549] ? jbd2_journal_lock_updates+0x29f/0x380 [ 56.995220][ T3549] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 57.001027][ T3549] ? __lock_acquire+0x1f80/0x1f80 [ 57.006060][ T3549] ? mutex_lock_nested+0x10/0x10 [ 57.011008][ T3549] ? do_raw_read_unlock+0x70/0x70 [ 57.016051][ T3549] ? rcu_sync_enter+0x202/0x340 [ 57.020905][ T3549] jbd2_journal_lock_updates+0x2b0/0x380 [ 57.026537][ T3549] ? jbd2_journal_wait_updates+0x2d0/0x2d0 [ 57.032338][ T3549] ? rcu_is_watching+0x11/0xb0 [ 57.037092][ T3549] ? _find_next_bit+0x11b/0x120 [ 57.041955][ T3549] ? percpu_down_write+0x2b7/0x2f0 [ 57.047058][ T3549] ? rcu_is_watching+0x11/0xb0 [ 57.051816][ T3549] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 57.057887][ T3549] ext4_fileattr_set+0xe04/0x1770 [ 57.062917][ T3549] ? ext4_fileattr_get+0x200/0x200 [ 57.068044][ T3549] ? rwsem_write_trylock+0x166/0x210 [ 57.073327][ T3549] ? clear_nonspinnable+0x60/0x60 [ 57.078348][ T3549] ? memset+0x1f/0x40 [ 57.082347][ T3549] ? fileattr_fill_flags+0x1d0/0x300 [ 57.087633][ T3549] ? fscrypt_prepare_setflags+0x5d/0x220 [ 57.093270][ T3549] vfs_fileattr_set+0x8f3/0xd30 [ 57.098133][ T3549] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 57.103509][ T3549] do_vfs_ioctl+0x1cd1/0x2a90 [ 57.108191][ T3549] ? __x64_compat_sys_ioctl+0x80/0x80 [ 57.113578][ T3549] ? __lock_acquire+0x1f80/0x1f80 [ 57.118600][ T3549] ? lockdep_hardirqs_on+0x94/0x130 [ 57.123815][ T3549] ? __kmem_cache_free+0x25c/0x3c0 [ 57.128919][ T3549] ? tomoyo_path_number_perm+0x61b/0x7f0 [ 57.134540][ T3549] ? tomoyo_path_number_perm+0x68a/0x7f0 [ 57.140163][ T3549] ? tomoyo_path_number_perm+0x1f2/0x7f0 [ 57.145789][ T3549] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 57.151512][ T3549] ? kmem_cache_free+0x292/0x510 [ 57.156455][ T3549] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 57.162437][ T3549] ? print_irqtrace_events+0x210/0x210 [ 57.167898][ T3549] ? print_irqtrace_events+0x210/0x210 [ 57.173374][ T3549] ? bpf_lsm_file_ioctl+0x5/0x10 [ 57.178314][ T3549] ? security_file_ioctl+0x7d/0xa0 [ 57.183425][ T3549] __se_sys_ioctl+0x81/0x160 [ 57.188047][ T3549] do_syscall_64+0x3d/0xb0 [ 57.192484][ T3549] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 57.198378][ T3549] RIP: 0033:0x7f85fa851369 [ 57.202791][ T3549] 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 [ 57.222388][ T3549] RSP: 002b:00007ffe3f7e9d78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 57.230794][ T3549] RAX: ffffffffffffffda RBX: 0073746e6576652e RCX: 00007f85fa851369 [ 57.238760][ T3549] RDX: 0000000020000000 RSI: 0000000040086602 RDI: 0000000000000005 [ 57.246725][ T3549] RBP: 652e79726f