====================================================== WARNING: possible circular locking dependency detected 5.15.180-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:4/3081 is trying to acquire lock: ffff88806062d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] ffff88806062d108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: __ocfs2_flush_truncate_log+0x329/0x1060 fs/ocfs2/alloc.c:6045 but task is already holding lock: ffff888060633488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] ffff888060633488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6074 [inline] ffff888060633488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_truncate_log_worker+0x97/0x190 fs/ocfs2/alloc.c:6088 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+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:787 [inline] ocfs2_move_extent fs/ocfs2/move_extents.c:640 [inline] __ocfs2_move_extents_range+0x1a61/0x3360 fs/ocfs2/move_extents.c:860 ocfs2_move_extents+0x37c/0x960 fs/ocfs2/move_extents.c:927 ocfs2_ioctl_move_extents+0x4dd/0x6b0 fs/ocfs2/move_extents.c:1053 ocfs2_ioctl+0x2d9/0x720 fs/ocfs2/ioctl.c:931 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:787 [inline] __ocfs2_flush_truncate_log+0x329/0x1060 fs/ocfs2/alloc.c:6045 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6075 [inline] ocfs2_truncate_log_worker+0x9f/0x190 fs/ocfs2/alloc.c:6088 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 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:4/3081: #0: ffff88801e439938 ((wq_completion)ocfs2_wq){+.+.}-{0:0}, at: process_one_work+0x760/0x1000 kernel/workqueue.c:-1 #1: ffffc9000c69fd00 ((work_completion)(&(&osb->osb_truncate_log_wq)->work)){+.+.}-{0:0}, at: process_one_work+0x7a3/0x1000 kernel/workqueue.c:2285 #2: ffff888060633488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #2: ffff888060633488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6074 [inline] #2: ffff888060633488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_truncate_log_worker+0x97/0x190 fs/ocfs2/alloc.c:6088 stack backtrace: CPU: 1 PID: 3081 Comm: kworker/u4:4 Not tainted 5.15.180-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Workqueue: ocfs2_wq ocfs2_truncate_log_worker Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain kernel/locking/lockdep.c:3788 [inline] __lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:787 [inline] __ocfs2_flush_truncate_log+0x329/0x1060 fs/ocfs2/alloc.c:6045 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6075 [inline] ocfs2_truncate_log_worker+0x9f/0x190 fs/ocfs2/alloc.c:6088 process_one_work+0x863/0x1000 kernel/workqueue.c:2310 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready