ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.313/5737 is trying to acquire lock: ffff0000f5e23120 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_read_virt_blocks+0x238/0x8f0 fs/ocfs2/extent_map.c:984 but task is already holding lock: ffff0000f3a888e8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x374/0x6cc fs/ocfs2/journal.c:374 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x374/0x6cc fs/ocfs2/journal.c:374 ocfs2_setattr+0xe58/0x1930 fs/ocfs2/file.c:1251 notify_change+0xb0c/0xdcc fs/attr.c:499 chown_common+0x420/0x594 fs/open.c:736 vfs_fchown fs/open.c:804 [inline] ksys_fchown+0xe0/0x158 fs/open.c:815 __do_sys_fchown fs/open.c:823 [inline] __se_sys_fchown fs/open.c:821 [inline] __arm64_sys_fchown+0x7c/0x94 fs/open.c:821 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #1 (sb_internal#2){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1891 [inline] sb_start_intwrite include/linux/fs.h:2013 [inline] ocfs2_start_trans+0x20c/0x6cc fs/ocfs2/journal.c:372 ocfs2_setattr+0xe58/0x1930 fs/ocfs2/file.c:1251 notify_change+0xb0c/0xdcc fs/attr.c:499 chown_common+0x420/0x594 fs/open.c:736 vfs_fchown fs/open.c:804 [inline] ksys_fchown+0xe0/0x158 fs/open.c:815 __do_sys_fchown fs/open.c:823 [inline] __se_sys_fchown fs/open.c:821 [inline] __arm64_sys_fchown+0x7c/0x94 fs/open.c:821 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 -> #0 (&ocfs2_file_ip_alloc_sem_key){++++}-{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+0x2880/0x6800 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662 down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_read_virt_blocks+0x238/0x8f0 fs/ocfs2/extent_map.c:984 ocfs2_read_dir_block fs/ocfs2/dir.c:508 [inline] ocfs2_find_entry_el fs/ocfs2/dir.c:715 [inline] ocfs2_find_entry+0x2e4/0x1d6c fs/ocfs2/dir.c:1091 ocfs2_find_files_on_disk+0x128/0x40c fs/ocfs2/dir.c:1995 ocfs2_lookup_ino_from_name+0x60/0x114 fs/ocfs2/dir.c:2017 ocfs2_find_victim_alloc_group+0x1a0/0x7f0 fs/ocfs2/move_extents.c:385 ocfs2_move_extent fs/ocfs2/move_extents.c:656 [inline] __ocfs2_move_extents_range+0x1518/0x29c8 fs/ocfs2/move_extents.c:866 ocfs2_move_extents+0x328/0x818 fs/ocfs2/move_extents.c:938 ocfs2_ioctl_move_extents+0x410/0x5e8 fs/ocfs2/move_extents.c:1064 ocfs2_ioctl+0x220/0xb44 fs/ocfs2/ioctl.c:930 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585 other info that might help us debug this: Chain exists of: &ocfs2_file_ip_alloc_sem_key --> sb_internal#2 --> &journal->j_trans_barrier Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&journal->j_trans_barrier); lock(sb_internal#2); lock(&journal->j_trans_barrier); lock(&ocfs2_file_ip_alloc_sem_key); *** DEADLOCK *** 9 locks held by syz.0.313/5737: #0: ffff0000d9f90460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write_file+0x64/0x1e8 fs/namespace.c:446 #1: ffff0000f5c75108 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff0000f5c75108 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: ocfs2_move_extents+0x168/0x818 fs/ocfs2/move_extents.c:916 #2: ffff0000f5c74da0 (&oi->ip_alloc_sem){+.+.}-{3:3}, at: ocfs2_move_extents+0x31c/0x818 fs/ocfs2/move_extents.c:936 #3: ffff0000f5e26d88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #3: ffff0000f5e26d88 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#5){+.+.}-{3:3}, at: ocfs2_reserve_suballoc_bits+0x10c/0x3c80 fs/ocfs2/suballoc.c:782 #4: ffff0000f5e25108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #4: ffff0000f5e25108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:638 [inline] #4: ffff0000f5e25108 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#3){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0xda0/0x29c8 fs/ocfs2/move_extents.c:866 #5: ffff0000f5e19808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #5: ffff0000f5e19808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:646 [inline] #5: ffff0000f5e19808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: __ocfs2_move_extents_range+0x1360/0x29c8 fs/ocfs2/move_extents.c:866 #6: ffff0000d9f90650 (sb_internal#2){.+.+}-{0:0}, at: ocfs2_move_extent fs/ocfs2/move_extents.c:648 [inline] #6: ffff0000d9f90650 (sb_internal#2){.+.+}-{0:0}, at: __ocfs2_move_extents_range+0x136c/0x29c8 fs/ocfs2/move_extents.c:866 #7: ffff0000f3a888e8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x374/0x6cc fs/ocfs2/journal.c:374 #8: ffff0000d2f32990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x1020/0x1280 fs/jbd2/transaction.c:461 stack backtrace: CPU: 1 PID: 5737 Comm: syz.0.313 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: dump_backtrace+0x1c0/0x1ec arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048 check_noncircular+0x264/0x2f8 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+0x2880/0x6800 kernel/locking/lockdep.c:5049 lock_acquire+0x20c/0x63c kernel/locking/lockdep.c:5662 down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_read_virt_blocks+0x238/0x8f0 fs/ocfs2/extent_map.c:984 ocfs2_read_dir_block fs/ocfs2/dir.c:508 [inline] ocfs2_find_entry_el fs/ocfs2/dir.c:715 [inline] ocfs2_find_entry+0x2e4/0x1d6c fs/ocfs2/dir.c:1091 ocfs2_find_files_on_disk+0x128/0x40c fs/ocfs2/dir.c:1995 ocfs2_lookup_ino_from_name+0x60/0x114 fs/ocfs2/dir.c:2017 ocfs2_find_victim_alloc_group+0x1a0/0x7f0 fs/ocfs2/move_extents.c:385 ocfs2_move_extent fs/ocfs2/move_extents.c:656 [inline] __ocfs2_move_extents_range+0x1518/0x29c8 fs/ocfs2/move_extents.c:866 ocfs2_move_extents+0x328/0x818 fs/ocfs2/move_extents.c:938 ocfs2_ioctl_move_extents+0x410/0x5e8 fs/ocfs2/move_extents.c:1064 ocfs2_ioctl+0x220/0xb44 fs/ocfs2/ioctl.c:930 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b4 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x130 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585