Warning: Permanently added '10.128.0.75' (ED25519) to the list of known hosts. executing program [ 59.964924][ T3546] [ 59.967290][ T3546] ====================================================== [ 59.974368][ T3546] WARNING: possible circular locking dependency detected [ 59.981377][ T3546] 6.1.71-syzkaller #0 Not tainted [ 59.986409][ T3546] ------------------------------------------------------ [ 59.993526][ T3546] syz-executor175/3546 is trying to acquire lock: [ 59.999931][ T3546] ffff88807ef4a170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x2b0/0x380 [ 60.010396][ T3546] [ 60.010396][ T3546] but task is already holding lock: [ 60.017760][ T3546] ffff88807ef48b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 60.029078][ T3546] [ 60.029078][ T3546] which lock already depends on the new lock. [ 60.029078][ T3546] [ 60.039548][ T3546] [ 60.039548][ T3546] the existing dependency chain (in reverse order) is: [ 60.048580][ T3546] [ 60.048580][ T3546] -> #4 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 60.057033][ T3546] lock_acquire+0x1f8/0x5a0 [ 60.062082][ T3546] percpu_down_write+0x50/0x2f0 [ 60.067478][ T3546] ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 60.074083][ T3546] ext4_fileattr_set+0xe04/0x1770 [ 60.079636][ T3546] vfs_fileattr_set+0x8f3/0xd30 [ 60.085032][ T3546] do_vfs_ioctl+0x1cd1/0x2a90 [ 60.090238][ T3546] __se_sys_ioctl+0x81/0x160 [ 60.095356][ T3546] do_syscall_64+0x3d/0xb0 [ 60.100908][ T3546] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 60.107345][ T3546] [ 60.107345][ T3546] -> #3 (mapping.invalidate_lock){++++}-{3:3}: [ 60.115692][ T3546] lock_acquire+0x1f8/0x5a0 [ 60.120727][ T3546] down_write+0x36/0x60 [ 60.125415][ T3546] ext4_setattr+0xec7/0x1a00 [ 60.130553][ T3546] notify_change+0xce3/0xfc0 [ 60.135671][ T3546] do_truncate+0x21c/0x300 [ 60.140611][ T3546] do_sys_ftruncate+0x2e2/0x380 [ 60.145991][ T3546] do_syscall_64+0x3d/0xb0 [ 60.150939][ T3546] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 60.157362][ T3546] [ 60.157362][ T3546] -> #2 (&sb->s_type->i_mutex_key#8){++++}-{3:3}: [ 60.165983][ T3546] lock_acquire+0x1f8/0x5a0 [ 60.171037][ T3546] down_read+0xad/0xa30 [ 60.175716][ T3546] ext4_bmap+0x4b/0x410 [ 60.180400][ T3546] bmap+0xa1/0xd0 [ 60.184562][ T3546] jbd2_journal_flush+0x5b5/0xc40 [ 60.190657][ T3546] ext4_ioctl+0x3986/0x5f60 [ 60.195686][ T3546] __se_sys_ioctl+0xf1/0x160 [ 60.200804][ T3546] do_syscall_64+0x3d/0xb0 [ 60.205748][ T3546] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 60.212275][ T3546] [ 60.212275][ T3546] -> #1 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 60.221069][ T3546] lock_acquire+0x1f8/0x5a0 [ 60.226111][ T3546] mutex_lock_io_nested+0x134/0xab0 [ 60.231847][ T3546] jbd2_journal_flush+0x29b/0xc40 [ 60.237422][ T3546] ext4_ioctl+0x3986/0x5f60 [ 60.242464][ T3546] __se_sys_ioctl+0xf1/0x160 [ 60.247590][ T3546] do_syscall_64+0x3d/0xb0 [ 60.252545][ T3546] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 60.258971][ T3546] [ 60.258971][ T3546] -> #0 (&journal->j_barrier){+.+.}-{3:3}: [ 60.266969][ T3546] validate_chain+0x1661/0x5950 [ 60.272356][ T3546] __lock_acquire+0x125b/0x1f80 [ 60.277733][ T3546] lock_acquire+0x1f8/0x5a0 [ 60.282784][ T3546] __mutex_lock+0x132/0xd80 [ 60.287816][ T3546] jbd2_journal_lock_updates+0x2b0/0x380 [ 60.293971][ T3546] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 60.300649][ T3546] ext4_fileattr_set+0xe04/0x1770 [ 60.306198][ T3546] vfs_fileattr_set+0x8f3/0xd30 [ 60.311584][ T3546] do_vfs_ioctl+0x1cd1/0x2a90 [ 60.316820][ T3546] __se_sys_ioctl+0x81/0x160 [ 60.321940][ T3546] do_syscall_64+0x3d/0xb0 [ 60.326880][ T3546] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 60.333292][ T3546] [ 60.333292][ T3546] other info that might help us debug this: [ 60.333292][ T3546] [ 60.343518][ T3546] Chain exists of: [ 60.343518][ T3546] &journal->j_barrier --> mapping.invalidate_lock --> &sbi->s_writepages_rwsem [ 60.343518][ T3546] [ 60.358378][ T3546] Possible unsafe locking scenario: [ 60.358378][ T3546] [ 60.365821][ T3546] CPU0 CPU1 [ 60.371179][ T3546] ---- ---- [ 60.376542][ T3546] lock(&sbi->s_writepages_rwsem); [ 60.381741][ T3546] lock(mapping.invalidate_lock); [ 60.389371][ T3546] lock(&sbi->s_writepages_rwsem); [ 60.397086][ T3546] lock(&journal->j_barrier); [ 60.401847][ T3546] [ 60.401847][ T3546] *** DEADLOCK *** [ 60.401847][ T3546] [ 60.409985][ T3546] 4 locks held by syz-executor175/3546: [ 60.415523][ T3546] #0: ffff88807ef46460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 [ 60.425201][ T3546] #1: ffff8880739bf258 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_fileattr_set+0x135/0xd30 [ 60.435923][ T3546] #2: ffff8880739bf3f8 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_change_inode_journal_flag+0x115/0x6e0 [ 60.447594][ T3546] #3: ffff88807ef48b98 (&sbi->s_writepages_rwsem){++++}-{0:0}, at: ext4_change_inode_journal_flag+0x1a0/0x6e0 [ 60.459347][ T3546] [ 60.459347][ T3546] stack backtrace: [ 60.465227][ T3546] CPU: 1 PID: 3546 Comm: syz-executor175 Not tainted 6.1.71-syzkaller #0 [ 60.473634][ T3546] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 [ 60.483689][ T3546] Call Trace: [ 60.486979][ T3546] [ 60.489928][ T3546] dump_stack_lvl+0x1e3/0x2cb [ 60.494614][ T3546] ? nf_tcp_handle_invalid+0x642/0x642 [ 60.500087][ T3546] ? print_circular_bug+0x12b/0x1a0 [ 60.505288][ T3546] check_noncircular+0x2fa/0x3b0 [ 60.510237][ T3546] ? lockdep_lock+0x2a0/0x2a0 [ 60.514920][ T3546] ? add_chain_block+0x850/0x850 [ 60.519874][ T3546] ? lockdep_lock+0x11f/0x2a0 [ 60.524558][ T3546] ? validate_chain+0x112/0x5950 [ 60.529506][ T3546] ? _find_first_zero_bit+0xd0/0x100 [ 60.534798][ T3546] validate_chain+0x1661/0x5950 [ 60.539667][ T3546] ? reacquire_held_locks+0x660/0x660 [ 60.545051][ T3546] ? validate_chain+0x13ce/0x5950 [ 60.550090][ T3546] ? mark_lock+0x9a/0x340 [ 60.554444][ T3546] ? __lock_acquire+0x125b/0x1f80 [ 60.559477][ T3546] ? mark_lock+0x9a/0x340 [ 60.563814][ T3546] __lock_acquire+0x125b/0x1f80 [ 60.568677][ T3546] lock_acquire+0x1f8/0x5a0 [ 60.573191][ T3546] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 60.579002][ T3546] ? read_lock_is_recursive+0x10/0x10 [ 60.584384][ T3546] ? __might_sleep+0xb0/0xb0 [ 60.588976][ T3546] ? do_raw_spin_unlock+0x137/0x8a0 [ 60.594181][ T3546] ? lockdep_hardirqs_on+0x94/0x130 [ 60.599388][ T3546] __mutex_lock+0x132/0xd80 [ 60.603902][ T3546] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 60.609712][ T3546] ? jbd2_journal_lock_updates+0x29f/0x380 [ 60.615521][ T3546] ? jbd2_journal_lock_updates+0x2b0/0x380 [ 60.621331][ T3546] ? __lock_acquire+0x1f80/0x1f80 [ 60.626361][ T3546] ? mutex_lock_nested+0x10/0x10 [ 60.631310][ T3546] ? do_raw_read_unlock+0x70/0x70 [ 60.636339][ T3546] ? rcu_sync_enter+0x202/0x340 [ 60.641203][ T3546] jbd2_journal_lock_updates+0x2b0/0x380 [ 60.646844][ T3546] ? jbd2_journal_wait_updates+0x2d0/0x2d0 [ 60.652670][ T3546] ? rcu_is_watching+0x11/0xb0 [ 60.657435][ T3546] ? _find_next_bit+0x11b/0x120 [ 60.662294][ T3546] ? percpu_down_write+0x2b7/0x2f0 [ 60.667405][ T3546] ? rcu_is_watching+0x11/0xb0 [ 60.672173][ T3546] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 60.678279][ T3546] ext4_fileattr_set+0xe04/0x1770 [ 60.683317][ T3546] ? ext4_fileattr_get+0x200/0x200 [ 60.688437][ T3546] ? rwsem_write_trylock+0x166/0x210 [ 60.693730][ T3546] ? clear_nonspinnable+0x60/0x60 [ 60.698761][ T3546] ? memset+0x1f/0x40 [ 60.702752][ T3546] ? fileattr_fill_flags+0x1d0/0x300 [ 60.708054][ T3546] ? fscrypt_prepare_setflags+0x5d/0x220 [ 60.713699][ T3546] vfs_fileattr_set+0x8f3/0xd30 [ 60.718565][ T3546] ? copy_fsxattr_to_user+0x3a0/0x3a0 [ 60.723953][ T3546] do_vfs_ioctl+0x1cd1/0x2a90 [ 60.728647][ T3546] ? __x64_compat_sys_ioctl+0x80/0x80 [ 60.734029][ T3546] ? __lock_acquire+0x1f80/0x1f80 [ 60.739064][ T3546] ? lockdep_hardirqs_on+0x94/0x130 [ 60.744269][ T3546] ? __kmem_cache_free+0x25c/0x3c0 [ 60.749398][ T3546] ? tomoyo_path_number_perm+0x61b/0x7f0 [ 60.755034][ T3546] ? tomoyo_path_number_perm+0x68a/0x7f0 [ 60.760687][ T3546] ? tomoyo_path_number_perm+0x1f2/0x7f0 [ 60.766319][ T3546] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 60.771788][ T3546] ? lockdep_hardirqs_on+0x94/0x130 [ 60.776989][ T3546] ? kmem_cache_free+0x292/0x510 [ 60.781945][ T3546] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 60.787937][ T3546] ? print_irqtrace_events+0x210/0x210 [ 60.793405][ T3546] ? print_irqtrace_events+0x210/0x210 [ 60.798872][ T3546] ? bpf_lsm_file_ioctl+0x5/0x10 [ 60.803812][ T3546] ? security_file_ioctl+0x7d/0xa0 [ 60.808930][ T3546] __se_sys_ioctl+0x81/0x160 [ 60.813533][ T3546] do_syscall_64+0x3d/0xb0 [ 60.817962][ T3546] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 60.823862][ T3546] RIP: 0033:0x7fc5a601f329 [ 60.828279][ T3546] 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 [ 60.847885][ T3546] RSP: 002b:00007ffecdea8188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 60.856306][ T3546] RAX: ffffffffffffffda RBX: 00007ffecdea8358 RCX: 00007fc5a601f329 [ 60.864280][ T3546] RDX: 0000000020000180 RSI: 0000000