ocfs2: Mounting device (7,4) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected 5.15.185-syzkaller #0 Not tainted ------------------------------------------------------ syz.4.855/6724 is trying to acquire lock: ffff0000ef9b6d88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] ffff0000ef9b6d88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:640 [inline] ffff0000ef9b6d88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x1380/0x2aac fs/ocfs2/move_extents.c:860 but task is already holding lock: ffff0000ef9b1808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] ffff0000ef9b1808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:632 [inline] ffff0000ef9b1808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0xe40/0x2aac fs/ocfs2/move_extents.c:860 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+0xbc/0x12c kernel/locking/rwsem.c:1551 inode_lock include/linux/fs.h:787 [inline] ocfs2_reserve_suballoc_bits+0x12c/0x3a68 fs/ocfs2/suballoc.c:782 ocfs2_reserve_cluster_bitmap_bits fs/ocfs2/suballoc.c:1128 [inline] ocfs2_reserve_clusters_with_limit+0x290/0x9e0 fs/ocfs2/suballoc.c:1173 ocfs2_reserve_clusters+0x3c/0x50 fs/ocfs2/suballoc.c:1223 ocfs2_defrag_extent fs/ocfs2/move_extents.c:266 [inline] __ocfs2_move_extents_range+0x105c/0x2aac fs/ocfs2/move_extents.c:857 ocfs2_move_extents+0x314/0x7e0 fs/ocfs2/move_extents.c:927 ocfs2_ioctl_move_extents+0x3fc/0x5c8 fs/ocfs2/move_extents.c:1053 ocfs2_ioctl+0x204/0xc60 fs/ocfs2/ioctl.c:931 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{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+0x2928/0x651c kernel/locking/lockdep.c:5012 lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623 down_write+0xbc/0x12c 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+0x1380/0x2aac fs/ocfs2/move_extents.c:860 ocfs2_move_extents+0x314/0x7e0 fs/ocfs2/move_extents.c:927 ocfs2_ioctl_move_extents+0x3fc/0x5c8 fs/ocfs2/move_extents.c:1053 ocfs2_ioctl+0x204/0xc60 fs/ocfs2/ioctl.c:931 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 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.855/6724: #0: ffff0000d83b4460 (sb_writers#23){.+.+}-{0:0}, at: mnt_want_write_file+0x64/0x1e8 fs/namespace.c:421 #1: ffff0000deb289c8 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #1: ffff0000deb289c8 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: ocfs2_move_extents+0x16c/0x7e0 fs/ocfs2/move_extents.c:905 #2: ffff0000deb28660 (&oi->ip_alloc_sem){+.+.}-{3:3}, at: ocfs2_move_extents+0x308/0x7e0 fs/ocfs2/move_extents.c:925 #3: ffff0000ef9b3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #3: ffff0000ef9b3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: ocfs2_reserve_suballoc_bits+0x12c/0x3a68 fs/ocfs2/suballoc.c:782 #4: ffff0000ef9b1808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline] #4: ffff0000ef9b1808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:632 [inline] #4: ffff0000ef9b1808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0xe40/0x2aac fs/ocfs2/move_extents.c:860 stack backtrace: CPU: 0 PID: 6724 Comm: syz.4.855 Not tainted 5.15.185-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2011 check_noncircular+0x240/0x2d4 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+0x2928/0x651c kernel/locking/lockdep.c:5012 lock_acquire+0x1f4/0x620 kernel/locking/lockdep.c:5623 down_write+0xbc/0x12c 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+0x1380/0x2aac fs/ocfs2/move_extents.c:860 ocfs2_move_extents+0x314/0x7e0 fs/ocfs2/move_extents.c:927 ocfs2_ioctl_move_extents+0x3fc/0x5c8 fs/ocfs2/move_extents.c:1053 ocfs2_ioctl+0x204/0xc60 fs/ocfs2/ioctl.c:931 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 (syz.4.855,6724,1):ocfs2_inode_is_valid_to_delete:872 ERROR: Skipping delete of system file 72 ocfs2: Unmounting device (7,4) on (node local)