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.342/5956 is trying to acquire lock: ffff88805107c990 (jbd2_handle){++++}-{0:0}, at: wait_transaction_locked+0x1a6/0x270 fs/jbd2/transaction.c:177 but task is already holding lock: ffff88802ca5bce8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x3a4/0x6f0 fs/ocfs2/journal.c:374 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x3a4/0x6f0 fs/ocfs2/journal.c:374 ocfs2_modify_bh+0xe0/0x4c0 fs/ocfs2/quota_local.c:101 ocfs2_local_read_info+0x1499/0x1820 fs/ocfs2/quota_local.c:764 dquot_load_quota_sb+0x72f/0xa80 fs/quota/dquot.c:2495 dquot_load_quota_inode+0x2d3/0x5c0 fs/quota/dquot.c:2532 ocfs2_enable_quotas+0x1c0/0x4a0 fs/ocfs2/super.c:926 ocfs2_fill_super+0x40fe/0x5010 fs/ocfs2/super.c:1139 mount_bdev+0x28a/0x3c0 fs/super.c:1454 legacy_get_tree+0xe6/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1584 do_new_mount+0x247/0xa40 fs/namespace.c:3078 do_mount fs/namespace.c:3421 [inline] __do_sys_mount fs/namespace.c:3629 [inline] __se_sys_mount+0x2e3/0x3d0 fs/namespace.c:3606 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #4 (sb_internal#4){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1897 [inline] sb_start_intwrite include/linux/fs.h:2019 [inline] ocfs2_start_trans+0x2a5/0x6f0 fs/ocfs2/journal.c:372 ocfs2_acquire_dquot+0x69a/0xb80 fs/ocfs2/quota_global.c:848 dqget+0x713/0xbb0 fs/quota/dquot.c:1013 __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1542 ocfs2_get_init_inode+0x144/0x1b0 fs/ocfs2/namei.c:202 ocfs2_mknod+0xb90/0x2580 fs/ocfs2/namei.c:310 ocfs2_create+0x1b6/0x4b0 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3831 do_filp_open+0x1ee/0x420 fs/namei.c:3861 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_creat fs/open.c:1414 [inline] __se_sys_creat fs/open.c:1408 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1408 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #3 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}: down_write+0x36/0x60 kernel/locking/rwsem.c:1573 ocfs2_create_local_dquot+0x19a/0x1900 fs/ocfs2/quota_local.c:1224 ocfs2_acquire_dquot+0x7e6/0xb80 fs/ocfs2/quota_global.c:871 dqget+0x713/0xbb0 fs/quota/dquot.c:1013 __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1542 ocfs2_get_init_inode+0x144/0x1b0 fs/ocfs2/namei.c:202 ocfs2_mknod+0xb90/0x2580 fs/ocfs2/namei.c:310 ocfs2_create+0x1b6/0x4b0 fs/ocfs2/namei.c:674 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0x11b9/0x2f10 fs/namei.c:3831 do_filp_open+0x1ee/0x420 fs/namei.c:3861 do_sys_openat2+0x14b/0x4f0 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_creat fs/open.c:1414 [inline] __se_sys_creat fs/open.c:1408 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1408 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #2 (&dquot->dq_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747 dquot_commit+0x5a/0x410 fs/quota/dquot.c:535 ext4_write_dquot+0x1f0/0x360 fs/ext4/super.c:6817 mark_dquot_dirty fs/quota/dquot.c:400 [inline] mark_all_dquot_dirty+0xf9/0x400 fs/quota/dquot.c:440 __dquot_alloc_space+0x5f6/0xe50 fs/quota/dquot.c:1777 dquot_alloc_space_nodirty include/linux/quotaops.h:293 [inline] dquot_alloc_space include/linux/quotaops.h:306 [inline] dquot_alloc_block include/linux/quotaops.h:330 [inline] ext4_mb_new_blocks+0xf55/0x44d0 fs/ext4/mballoc.c:5740 ext4_ext_map_blocks+0x18d1/0x6640 fs/ext4/extents.c:4361 ext4_map_blocks+0x9d7/0x1a90 fs/ext4/inode.c:681 ext4_getblk+0x1c5/0x720 fs/ext4/inode.c:892 ext4_bread+0x26/0x170 fs/ext4/inode.c:948 ext4_init_symlink_block fs/ext4/namei.c:3394 [inline] ext4_symlink+0x515/0x940 fs/ext4/namei.c:3471 vfs_symlink+0x245/0x3d0 fs/namei.c:4522 do_symlinkat+0x1b6/0x400 fs/namei.c:4551 __do_sys_symlinkat fs/namei.c:4568 [inline] __se_sys_symlinkat fs/namei.c:4565 [inline] __x64_sys_symlinkat+0x95/0xa0 fs/namei.c:4565 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #1 (&ei->i_data_sem){++++}-{3:3}: down_read+0x42/0x2d0 kernel/locking/rwsem.c:1520 ext4_map_blocks+0x338/0x1a90 fs/ext4/inode.c:606 ext4_append+0x22d/0x560 fs/ext4/namei.c:75 ext4_init_new_dir+0x2b8/0x550 fs/ext4/namei.c:3030 ext4_mkdir+0x4c3/0xc90 fs/ext4/namei.c:3076 vfs_mkdir+0x386/0x570 fs/namei.c:4157 do_mkdirat+0x1d8/0x440 fs/namei.c:4182 __do_sys_mkdir fs/namei.c:4202 [inline] __se_sys_mkdir fs/namei.c:4200 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4200 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (jbd2_handle){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676 wait_transaction_locked+0x1bf/0x270 fs/jbd2/transaction.c:177 add_transaction_credits fs/jbd2/transaction.c:241 [inline] start_this_handle+0x7e7/0x2240 fs/jbd2/transaction.c:422 jbd2__journal_restart+0x235/0x6c0 fs/jbd2/transaction.c:815 ocfs2_extend_trans+0x2fc/0x800 fs/ocfs2/journal.c:459 ocfs2_extend_rotate_transaction fs/ocfs2/alloc.c:2297 [inline] ocfs2_truncate_rec+0x882/0x1ec0 fs/ocfs2/alloc.c:5433 ocfs2_remove_extent+0x181a/0x2080 fs/ocfs2/alloc.c:5635 ocfs2_remove_btree_range+0xf08/0x15e0 fs/ocfs2/alloc.c:5770 ocfs2_remove_inode_range+0xfc5/0x2870 fs/ocfs2/file.c:1907 ocfs2_reflink_remap_extent fs/ocfs2/refcounttree.c:4543 [inline] ocfs2_reflink_remap_blocks+0xc61/0x1aa0 fs/ocfs2/refcounttree.c:4690 ocfs2_remap_file_range+0x4a7/0x740 fs/ocfs2/file.c:2703 vfs_copy_file_range+0xd93/0x14f0 fs/read_write.c:1518 __do_sys_copy_file_range fs/read_write.c:1596 [inline] __se_sys_copy_file_range+0x320/0x470 fs/read_write.c:1559 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: jbd2_handle --> sb_internal#4 --> &journal->j_trans_barrier Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&journal->j_trans_barrier); lock(sb_internal#4); lock(&journal->j_trans_barrier); lock(jbd2_handle); *** DEADLOCK *** 7 locks held by syz.8.342/5956: #0: ffff888052c2c460 (sb_writers#23){.+.+}-{0:0}, at: vfs_copy_file_range+0x8b7/0x14f0 fs/read_write.c:1502 #1: ffff888068315f48 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #1: ffff888068315f48 (&sb->s_type->i_mutex_key#29){+.+.}-{3:3}, at: lock_two_nondirectories+0xf7/0x150 fs/inode.c:1208 #2: ffff888068315be0 (&ocfs2_file_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_remap_file_range+0x3d4/0x740 fs/ocfs2/file.c:2693 #3: ffff8880564e6898 (&new->rf_sem){+.+.}-{3:3}, at: __ocfs2_lock_refcount_tree fs/ocfs2/refcounttree.c:428 [inline] #3: ffff8880564e6898 (&new->rf_sem){+.+.}-{3:3}, at: ocfs2_lock_refcount_tree+0x1aa/0x9d0 fs/ocfs2/refcounttree.c:463 #4: ffff8880721e3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #4: ffff8880721e3488 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: ocfs2_remove_btree_range+0x64f/0x15e0 fs/ocfs2/alloc.c:5742 #5: ffff888052c2c650 (sb_internal#4){.+.+}-{0:0}, at: ocfs2_remove_btree_range+0x812/0x15e0 fs/ocfs2/alloc.c:5752 #6: ffff88802ca5bce8 (&journal->j_trans_barrier){.+.+}-{3:3}, at: ocfs2_start_trans+0x3a4/0x6f0 fs/ocfs2/journal.c:374 stack backtrace: CPU: 0 PID: 5956 Comm: syz.8.342 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170 check_prev_add kernel/locking/lockdep.c:3095 [inline] check_prevs_add kernel/locking/lockdep.c:3214 [inline] validate_chain kernel/locking/lockdep.c:3830 [inline] __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676 wait_transaction_locked+0x1bf/0x270 fs/jbd2/transaction.c:177 add_transaction_credits fs/jbd2/transaction.c:241 [inline] start_this_handle+0x7e7/0x2240 fs/jbd2/transaction.c:422 jbd2__journal_restart+0x235/0x6c0 fs/jbd2/transaction.c:815 ocfs2_extend_trans+0x2fc/0x800 fs/ocfs2/journal.c:459 ocfs2_extend_rotate_transaction fs/ocfs2/alloc.c:2297 [inline] ocfs2_truncate_rec+0x882/0x1ec0 fs/ocfs2/alloc.c:5433 ocfs2_remove_extent+0x181a/0x2080 fs/ocfs2/alloc.c:5635 ocfs2_remove_btree_range+0xf08/0x15e0 fs/ocfs2/alloc.c:5770 ocfs2_remove_inode_range+0xfc5/0x2870 fs/ocfs2/file.c:1907 ocfs2_reflink_remap_extent fs/ocfs2/refcounttree.c:4543 [inline] ocfs2_reflink_remap_blocks+0xc61/0x1aa0 fs/ocfs2/refcounttree.c:4690 ocfs2_remap_file_range+0x4a7/0x740 fs/ocfs2/file.c:2703 vfs_copy_file_range+0xd93/0x14f0 fs/read_write.c:1518 __do_sys_copy_file_range fs/read_write.c:1596 [inline] __se_sys_copy_file_range+0x320/0x470 fs/read_write.c:1559 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f86b859e159 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:00007f86b93a0028 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007f86b8825fa0 RCX: 00007f86b859e159 RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007f86b8635024 R08: 0000000000000863 R09: 0000000000000000 R10: 00002000000000c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f86b8826038 R14: 00007f86b8825fa0 R15: 00007fff95ccf2f8 OCFS2: ERROR (device loop8): int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *, u32, struct ocfs2_alloc_context *): local alloc inode 76 says it has 8 used bits, but a count shows 5 On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. (syz.8.342,5956,1):ocfs2_reserve_local_alloc_bits:709 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_reserve_clusters_with_limit:1188 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_reserve_clusters_with_limit:1237 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_lock_refcount_allocators:2881 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_make_clusters_writable:3199 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_replace_cow:3359 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_refcount_cow_hunk:3435 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_refcount_cow:3479 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_prepare_inode_for_write:2345 ERROR: status = -30 (syz.8.342,5956,1):ocfs2_file_write_iter:2454 ERROR: status = -30 syz.8.342 (5956) used greatest stack depth: 20784 bytes left