JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,8) on (node local, slot 0) with ordered data mode. ====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.8.432/7410 is trying to acquire lock: ffff0000fcaa42c8 (&sb->s_type->i_mutex_key#23/2){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:799 [inline] ffff0000fcaa42c8 (&sb->s_type->i_mutex_key#23/2){+.+.}-{3:3}, at: __ocfs2_reflink+0xa64/0x1338 fs/ocfs2/refcounttree.c:4202 but task is already holding lock: ffff0000fcaa4da0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_reflink+0x484/0x84c fs/ocfs2/refcounttree.c:4300 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}: down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_inode_lock_for_extent_tree+0xec/0x268 fs/ocfs2/file.c:2210 ocfs2_prepare_inode_for_write fs/ocfs2/file.c:2266 [inline] ocfs2_file_write_iter+0x5bc/0x1cd0 fs/ocfs2/file.c:2451 call_write_iter include/linux/fs.h:2271 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x3c8/0x7c8 fs/read_write.c:584 ksys_write+0x12c/0x228 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x12c 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:589 -> #1 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}: down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:764 [inline] vfs_rename+0x6a8/0xe3c fs/namei.c:4894 do_renameat2+0x760/0xaa4 fs/namei.c:5082 __do_sys_renameat2 fs/namei.c:5115 [inline] __se_sys_renameat2 fs/namei.c:5112 [inline] __arm64_sys_renameat2+0xe8/0x104 fs/namei.c:5112 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x12c 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:589 -> #0 (&sb->s_type->i_mutex_key#23/2){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3504/0x7280 kernel/locking/lockdep.c:5171 lock_acquire+0x210/0x63c kernel/locking/lockdep.c:5790 down_write_nested+0x64/0x94 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:799 [inline] __ocfs2_reflink+0xa64/0x1338 fs/ocfs2/refcounttree.c:4202 ocfs2_reflink+0x498/0x84c fs/ocfs2/refcounttree.c:4301 ocfs2_vfs_reflink+0x300/0x400 fs/ocfs2/refcounttree.c:4427 ocfs2_reflink_ioctl+0x35c/0x3f0 fs/ocfs2/refcounttree.c:4467 ocfs2_ioctl+0x884/0xb2c fs/ocfs2/ioctl.c:913 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/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x12c 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:589 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#23/2 --> &sb->s_type->i_mutex_key#24 --> &ocfs2_file_ip_alloc_sem_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_file_ip_alloc_sem_key); lock(&sb->s_type->i_mutex_key#24); lock(&ocfs2_file_ip_alloc_sem_key); lock(&sb->s_type->i_mutex_key#23/2); *** DEADLOCK *** 5 locks held by syz.8.432/7410: #0: ffff0000d328c460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:402 #1: ffff0000f793c2c8 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:799 [inline] #1: ffff0000f793c2c8 (&type->i_mutex_dir_key#8/1){+.+.}-{3:3}, at: filename_create+0x1b0/0x3a8 fs/namei.c:3931 #2: ffff0000fcaa5108 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #2: ffff0000fcaa5108 (&sb->s_type->i_mutex_key#24){+.+.}-{3:3}, at: ocfs2_vfs_reflink+0x2bc/0x400 fs/ocfs2/refcounttree.c:4424 #3: ffff0000fcaa4e38 (&oi->ip_xattr_sem){++++}-{3:3}, at: ocfs2_reflink+0x47c/0x84c fs/ocfs2/refcounttree.c:4299 #4: ffff0000fcaa4da0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_reflink+0x484/0x84c fs/ocfs2/refcounttree.c:4300 stack backtrace: CPU: 1 PID: 7410 Comm: syz.8.432 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call trace: dump_backtrace+0x1c4/0x1f0 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:2088 check_noncircular+0x290/0x370 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3504/0x7280 kernel/locking/lockdep.c:5171 lock_acquire+0x210/0x63c kernel/locking/lockdep.c:5790 down_write_nested+0x64/0x94 kernel/locking/rwsem.c:1689 inode_lock_nested include/linux/fs.h:799 [inline] __ocfs2_reflink+0xa64/0x1338 fs/ocfs2/refcounttree.c:4202 ocfs2_reflink+0x498/0x84c fs/ocfs2/refcounttree.c:4301 ocfs2_vfs_reflink+0x300/0x400 fs/ocfs2/refcounttree.c:4427 ocfs2_reflink_ioctl+0x35c/0x3f0 fs/ocfs2/refcounttree.c:4467 ocfs2_ioctl+0x884/0xb2c fs/ocfs2/ioctl.c:913 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/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x12c 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:589