====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.4.18/4415 is trying to acquire lock: ffff88805ef309c8 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6 ){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:793 [inline] ){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:648 [inline] ){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:868 but task is already holding lock: ffff88805ef2a648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:793 [inline] #5){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:640 [inline] #5){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x131f/0x3450 fs/ocfs2/move_extents.c:868 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]#5 ){+.+.}-{3:3} : down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:793 [inline] __ocfs2_flush_truncate_log+0x351/0x1110 fs/ocfs2/alloc.c:6044 ocfs2_flush_truncate_log+0x4b/0x60 fs/ocfs2/alloc.c:6074 ocfs2_sync_fs+0x119/0x330 fs/ocfs2/super.c:403 sync_filesystem+0x1be/0x220 fs/sync.c:66 generic_shutdown_super+0x6b/0x300 fs/super.c:448 kill_block_super+0x7c/0xe0 fs/super.c:1438 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x426/0x4d0 fs/namespace.c:1148 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:184 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:217 __syscall_exit_to_user_mode_work kernel/entry/common.c:299 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:310 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3} : check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:793 [inline] ocfs2_move_extent fs/ocfs2/move_extents.c:648 [inline] __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:868 ocfs2_move_extents+0x409/0xa40 fs/ocfs2/move_extents.c:940 ocfs2_ioctl_move_extents+0x4d7/0x6e0 fs/ocfs2/move_extents.c:1066 ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:947 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- 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); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type] #6); *** DEADLOCK *** 5 locks held by syz.4.18/4415: #0: ffff888060b50460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write_file+0x5c/0x200 fs/namespace.c:430 #1: ffff88805eefed88 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:793 [inline] , at: ocfs2_move_extents+0x19d/0xa40 fs/ocfs2/move_extents.c:918 #2: ffff88805eefea20 (&oi->ip_alloc_sem){++++}-{3:3} , at: ocfs2_move_extents+0x3fc/0xa40 fs/ocfs2/move_extents.c:938 #3: ffff88805ef2c2c8 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:793 [inline] , at: ocfs2_reserve_suballoc_bits+0x16d/0x44b0 fs/ocfs2/suballoc.c:804 #4: ffff88805ef2a648 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3} , at: inode_lock include/linux/fs.h:793 [inline] , at: ocfs2_move_extent fs/ocfs2/move_extents.c:640 [inline] , at: __ocfs2_move_extents_range+0x131f/0x3450 fs/ocfs2/move_extents.c:868 stack backtrace: CPU: 0 PID: 4415 Comm: syz.4.18 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 down_write+0x38/0x60 kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:793 [inline] ocfs2_move_extent fs/ocfs2/move_extents.c:648 [inline] __ocfs2_move_extents_range+0x1a31/0x3450 fs/ocfs2/move_extents.c:868 ocfs2_move_extents+0x409/0xa40 fs/ocfs2/move_extents.c:940 ocfs2_ioctl_move_extents+0x4d7/0x6e0 fs/ocfs2/move_extents.c:1066 ocfs2_ioctl+0x31f/0x7a0 fs/ocfs2/ioctl.c:947 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 RIP: 0033:0x7f5ca1388559 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5c9f5be028 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5ca160f090 RCX: 00007f5ca1388559 RDX: 0000200000004c40 RSI: 0000000040406f06 RDI: 0000000000000007 RBP: 00007f5ca141fb50 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5ca160f128 R14: 00007f5ca160f090 R15: 00007ffca3af13c8