Warning: Permanently added '10.128.0.142' (ECDSA) to the list of known hosts. executing program [ 43.159669][ T3499] [ 43.162009][ T3499] ====================================================== [ 43.169002][ T3499] WARNING: possible circular locking dependency detected [ 43.176085][ T3499] 5.15.118-syzkaller #0 Not tainted [ 43.181251][ T3499] ------------------------------------------------------ [ 43.188332][ T3499] syz-executor316/3499 is trying to acquire lock: [ 43.194716][ T3499] ffff8880120c83f0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_bmap+0x4b/0x410 [ 43.204393][ T3499] [ 43.204393][ T3499] but task is already holding lock: [ 43.211731][ T3499] ffff88814b8ba3f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x31c/0xc90 [ 43.222362][ T3499] [ 43.222362][ T3499] which lock already depends on the new lock. [ 43.222362][ T3499] [ 43.232929][ T3499] [ 43.232929][ T3499] the existing dependency chain (in reverse order) is: [ 43.241918][ T3499] [ 43.241918][ T3499] -> #3 (&journal->j_checkpoint_mutex){+.+.}-{3:3}: [ 43.250664][ T3499] lock_acquire+0x1db/0x4f0 [ 43.255667][ T3499] __mutex_lock_common+0x1da/0x25a0 [ 43.261360][ T3499] mutex_lock_io_nested+0x45/0x60 [ 43.266882][ T3499] jbd2_journal_flush+0x290/0xc90 [ 43.272405][ T3499] ext4_ioctl+0x322b/0x5b60 [ 43.277494][ T3499] __se_sys_ioctl+0xf1/0x160 [ 43.282582][ T3499] do_syscall_64+0x3d/0xb0 [ 43.287499][ T3499] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.293893][ T3499] [ 43.293893][ T3499] -> #2 (&journal->j_barrier){+.+.}-{3:3}: [ 43.302033][ T3499] lock_acquire+0x1db/0x4f0 [ 43.307035][ T3499] __mutex_lock_common+0x1da/0x25a0 [ 43.312731][ T3499] mutex_lock_nested+0x17/0x20 [ 43.317993][ T3499] jbd2_journal_lock_updates+0x4a9/0x580 [ 43.324122][ T3499] ext4_change_inode_journal_flag+0x1a8/0x6e0 [ 43.330689][ T3499] ext4_fileattr_set+0xdf4/0x1750 [ 43.336216][ T3499] vfs_fileattr_set+0x8f3/0xd30 [ 43.341566][ T3499] do_vfs_ioctl+0x1d85/0x2b70 [ 43.346736][ T3499] __se_sys_ioctl+0x81/0x160 [ 43.351825][ T3499] do_syscall_64+0x3d/0xb0 [ 43.356742][ T3499] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.363137][ T3499] [ 43.363137][ T3499] -> #1 (&sbi->s_writepages_rwsem){++++}-{0:0}: [ 43.371538][ T3499] lock_acquire+0x1db/0x4f0 [ 43.376544][ T3499] percpu_down_write+0x52/0x2d0 [ 43.381891][ T3499] ext4_ind_migrate+0x254/0x760 [ 43.387240][ T3499] ext4_fileattr_set+0xe8b/0x1750 [ 43.392764][ T3499] vfs_fileattr_set+0x8f3/0xd30 [ 43.398198][ T3499] do_vfs_ioctl+0x1d85/0x2b70 [ 43.403375][ T3499] __se_sys_ioctl+0x81/0x160 [ 43.408463][ T3499] do_syscall_64+0x3d/0xb0 [ 43.413377][ T3499] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.419767][ T3499] [ 43.419767][ T3499] -> #0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}: [ 43.428341][ T3499] validate_chain+0x1646/0x58b0 [ 43.433694][ T3499] __lock_acquire+0x1295/0x1ff0 [ 43.439045][ T3499] lock_acquire+0x1db/0x4f0 [ 43.444047][ T3499] down_read+0x45/0x2e0 [ 43.448702][ T3499] ext4_bmap+0x4b/0x410 [ 43.453355][ T3499] bmap+0xa1/0xd0 [ 43.457485][ T3499] jbd2_journal_flush+0x7a2/0xc90 [ 43.463101][ T3499] ext4_ioctl+0x322b/0x5b60 [ 43.468190][ T3499] __se_sys_ioctl+0xf1/0x160 [ 43.473280][ T3499] do_syscall_64+0x3d/0xb0 [ 43.478192][ T3499] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.484581][ T3499] [ 43.484581][ T3499] other info that might help us debug this: [ 43.484581][ T3499] [ 43.494783][ T3499] Chain exists of: [ 43.494783][ T3499] &sb->s_type->i_mutex_key#9 --> &journal->j_barrier --> &journal->j_checkpoint_mutex [ 43.494783][ T3499] [ 43.510223][ T3499] Possible unsafe locking scenario: [ 43.510223][ T3499] [ 43.517651][ T3499] CPU0 CPU1 [ 43.523426][ T3499] ---- ---- [ 43.528766][ T3499] lock(&journal->j_checkpoint_mutex); [ 43.534289][ T3499] lock(&journal->j_barrier); [ 43.541543][ T3499] lock(&journal->j_checkpoint_mutex); [ 43.549588][ T3499] lock(&sb->s_type->i_mutex_key#9); [ 43.554939][ T3499] [ 43.554939][ T3499] *** DEADLOCK *** [ 43.554939][ T3499] [ 43.563059][ T3499] 2 locks held by syz-executor316/3499: [ 43.568582][ T3499] #0: ffff88814b8ba170 (&journal->j_barrier){+.+.}-{3:3}, at: jbd2_journal_lock_updates+0x4a9/0x580 [ 43.579424][ T3499] #1: ffff88814b8ba3f8 (&journal->j_checkpoint_mutex){+.+.}-{3:3}, at: jbd2_journal_flush+0x31c/0xc90 [ 43.590451][ T3499] [ 43.590451][ T3499] stack backtrace: [ 43.596315][ T3499] CPU: 1 PID: 3499 Comm: syz-executor316 Not tainted 5.15.118-syzkaller #0 [ 43.604877][ T3499] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 [ 43.614908][ T3499] Call Trace: [ 43.618167][ T3499] [ 43.621076][ T3499] dump_stack_lvl+0x1e3/0x2cb [ 43.625734][ T3499] ? io_uring_drop_tctx_refs+0x19d/0x19d [ 43.631357][ T3499] ? print_circular_bug+0x12b/0x1a0 [ 43.636533][ T3499] check_noncircular+0x2f8/0x3b0 [ 43.641455][ T3499] ? add_chain_block+0x850/0x850 [ 43.646372][ T3499] ? lockdep_lock+0x11f/0x2a0 [ 43.651028][ T3499] ? print_irqtrace_events+0x210/0x210 [ 43.656465][ T3499] ? do_raw_spin_unlock+0x137/0x8b0 [ 43.661643][ T3499] validate_chain+0x1646/0x58b0 [ 43.666571][ T3499] ? lockdep_hardirqs_on+0x94/0x130 [ 43.671751][ T3499] ? reacquire_held_locks+0x660/0x660 [ 43.677107][ T3499] ? reacquire_held_locks+0x660/0x660 [ 43.682457][ T3499] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 43.688418][ T3499] ? __sched_text_start+0x8/0x8 [ 43.693296][ T3499] ? do_raw_spin_unlock+0x137/0x8b0 [ 43.698473][ T3499] ? mark_lock+0x98/0x340 [ 43.702786][ T3499] __lock_acquire+0x1295/0x1ff0 [ 43.707626][ T3499] lock_acquire+0x1db/0x4f0 [ 43.712119][ T3499] ? ext4_bmap+0x4b/0x410 [ 43.716434][ T3499] ? read_lock_is_recursive+0x10/0x10 [ 43.721792][ T3499] ? bit_waitqueue+0x30/0x30 [ 43.726368][ T3499] ? __might_sleep+0xc0/0xc0 [ 43.730941][ T3499] ? ext4_journalled_write_end+0xee0/0xee0 [ 43.736726][ T3499] down_read+0x45/0x2e0 [ 43.740860][ T3499] ? ext4_bmap+0x4b/0x410 [ 43.745169][ T3499] ? ext4_journalled_write_end+0xee0/0xee0 [ 43.750954][ T3499] ext4_bmap+0x4b/0x410 [ 43.755094][ T3499] ? ext4_journalled_write_end+0xee0/0xee0 [ 43.760884][ T3499] bmap+0xa1/0xd0 [ 43.764497][ T3499] jbd2_journal_flush+0x7a2/0xc90 [ 43.769498][ T3499] ? mutex_lock_nested+0x17/0x20 [ 43.774421][ T3499] ? __bpf_trace_jbd2_shrink_checkpoint_list+0x50/0x50 [ 43.781247][ T3499] ? bpf_lsm_capable+0x5/0x10 [ 43.785905][ T3499] ? security_capable+0x86/0xb0 [ 43.790734][ T3499] ext4_ioctl+0x322b/0x5b60 [ 43.795222][ T3499] ? do_vfs_ioctl+0x1b66/0x2b70 [ 43.800053][ T3499] ? ext4_fileattr_set+0x1750/0x1750 [ 43.805317][ T3499] ? __x64_compat_sys_ioctl+0x80/0x80 [ 43.810666][ T3499] ? __lock_acquire+0x1ff0/0x1ff0 [ 43.815684][ T3499] ? slab_free_freelist_hook+0xdd/0x160 [ 43.821211][ T3499] ? tomoyo_path_number_perm+0x648/0x810 [ 43.826823][ T3499] ? kfree+0xf1/0x270 [ 43.830785][ T3499] ? tomoyo_path_number_perm+0x6ab/0x810 [ 43.836398][ T3499] ? tomoyo_check_path_acl+0x1c0/0x1c0 [ 43.841846][ T3499] ? lockdep_hardirqs_on_prepare+0x438/0x7a0 [ 43.847806][ T3499] ? print_irqtrace_events+0x210/0x210 [ 43.853288][ T3499] ? vtime_user_exit+0x2d1/0x400 [ 43.858212][ T3499] ? bpf_lsm_file_ioctl+0x5/0x10 [ 43.863127][ T3499] ? security_file_ioctl+0x7d/0xa0 [ 43.868222][ T3499] ? ext4_fileattr_set+0x1750/0x1750 [ 43.873484][ T3499] __se_sys_ioctl+0xf1/0x160 [ 43.878054][ T3499] do_syscall_64+0x3d/0xb0 [ 43.882447][ T3499] entry_SYSCALL_64_after_hwframe+0x61/0xcb [ 43.888320][ T3499] RIP: 0033:0x7ff280a390a9 [ 43.892719][ T3499] 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 [ 43.912343][ T3499] RSP: 002b:00007ffc476a7fd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 43.920928][ T3499] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff280a390a9 [ 43.928877][ T3499] RDX: 0000000020000240 RSI: 000000004004662b RDI: 0000000000000004 [ 43.936917][ T3499] RBP: 00007ff2809fd090 R08: 0000000000000000 R09: 0000000000000000 [ 43.944865][ T3499] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff2809fd120 [ 43.952903][ T3499] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 43.960868][ T3499]