====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:8/4444 is trying to acquire lock: ffff88806fdac2c8 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] ffff88806fdac2c8 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: __ocfs2_flush_truncate_log+0x36a/0x1220 fs/ocfs2/alloc.c:6046 but task is already holding lock: ffff88806fd92648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] ffff88806fd92648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6075 [inline] ffff88806fd92648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_truncate_log_worker+0x97/0x190 fs/ocfs2/alloc.c:6089 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}: down_write+0x36/0x60 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] ocfs2_move_extent fs/ocfs2/move_extents.c:646 [inline] __ocfs2_move_extents_range+0x1a5f/0x35d0 fs/ocfs2/move_extents.c:866 ocfs2_move_extents+0x3ad/0x9c0 fs/ocfs2/move_extents.c:938 ocfs2_ioctl_move_extents+0x520/0x6c0 fs/ocfs2/move_extents.c:1064 ocfs2_ioctl+0x31e/0x7c0 fs/ocfs2/ioctl.c:930 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2d07/0x7d10 kernel/locking/lockdep.c:5049 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] __ocfs2_flush_truncate_log+0x36a/0x1220 fs/ocfs2/alloc.c:6046 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6076 [inline] ocfs2_truncate_log_worker+0x9f/0x190 fs/ocfs2/alloc.c:6089 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5); *** DEADLOCK *** 3 locks held by kworker/u4:8/4444: #0: ffff888027b2d938 ((wq_completion)ocfs2_wq){+.+.}-{0:0}, at: process_one_work+0x7b0/0x1160 kernel/workqueue.c:2267 #1: ffffc90004d3fd00 ((work_completion)(&(&osb->osb_truncate_log_wq)->work)){+.+.}-{0:0}, at: process_one_work+0x7b0/0x1160 kernel/workqueue.c:2267 #2: ffff88806fd92648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #2: ffff88806fd92648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6075 [inline] #2: ffff88806fd92648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_truncate_log_worker+0x97/0x190 fs/ocfs2/alloc.c:6089 stack backtrace: CPU: 1 PID: 4444 Comm: kworker/u4:8 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Workqueue: ocfs2_wq ocfs2_truncate_log_worker Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3090 [inline] check_prevs_add kernel/locking/lockdep.c:3209 [inline] validate_chain kernel/locking/lockdep.c:3825 [inline] __lock_acquire+0x2d07/0x7d10 kernel/locking/lockdep.c:5049 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5662 down_write+0x36/0x60 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:758 [inline] __ocfs2_flush_truncate_log+0x36a/0x1220 fs/ocfs2/alloc.c:6046 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6076 [inline] ocfs2_truncate_log_worker+0x9f/0x190 fs/ocfs2/alloc.c:6089 process_one_work+0x8a2/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1270 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295