(syz.8.7777,25148,1):ocfs2_block_check_validate:400 ERROR: CRC32 failed: stored: 0xb3775c19, computed 0x2dd1c265. Applying ECC. 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 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0 Not tainted ------------------------------------------------------ syz.8.7777/25148 is trying to acquire lock: ffff888054be5100 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:865 [inline] ffff888054be5100 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{4:4}, at: ocfs2_reserve_local_alloc_bits+0xf1/0xc50 fs/ocfs2/localalloc.c:636 but task is already holding lock: ffff888052466a20 (&ocfs2_quota_ip_alloc_sem_key){++++}-{4:4}, at: ocfs2_lock_global_qf+0x1c2/0x2d0 fs/ocfs2/quota_global.c:314 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #7 (&ocfs2_quota_ip_alloc_sem_key){++++}-{4:4}: down_write+0x93/0x200 kernel/locking/rwsem.c:1577 ocfs2_lock_global_qf+0x1c2/0x2d0 fs/ocfs2/quota_global.c:314 ocfs2_acquire_dquot+0x25a/0xaf0 fs/ocfs2/quota_global.c:828 dqget+0x694/0x1160 fs/quota/dquot.c:977 ocfs2_setattr+0x1d8f/0x2570 fs/ocfs2/file.c:1233 notify_change+0x6a9/0x1230 fs/attr.c:552 chown_common+0x538/0x670 fs/open.c:782 do_fchownat+0x1ac/0x200 fs/open.c:813 __do_sys_lchown fs/open.c:838 [inline] __se_sys_lchown fs/open.c:836 [inline] __x64_sys_lchown+0x7e/0xc0 fs/open.c:836 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #6 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{4:4}: down_write+0x93/0x200 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:865 [inline] ocfs2_lock_global_qf+0x195/0x2d0 fs/ocfs2/quota_global.c:313 ocfs2_acquire_dquot+0x25a/0xaf0 fs/ocfs2/quota_global.c:828 dqget+0x694/0x1160 fs/quota/dquot.c:977 ocfs2_setattr+0x1d8f/0x2570 fs/ocfs2/file.c:1233 notify_change+0x6a9/0x1230 fs/attr.c:552 chown_common+0x538/0x670 fs/open.c:782 do_fchownat+0x1ac/0x200 fs/open.c:813 __do_sys_lchown fs/open.c:838 [inline] __se_sys_lchown fs/open.c:836 [inline] __x64_sys_lchown+0x7e/0xc0 fs/open.c:836 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #5 (&dquot->dq_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 wait_on_dquot fs/quota/dquot.c:354 [inline] dqget+0x5f2/0x1160 fs/quota/dquot.c:972 dquot_transfer+0x531/0x6a0 fs/quota/dquot.c:2154 ext4_setattr+0x80b/0x2a70 fs/ext4/inode.c:5401 notify_change+0x6a9/0x1230 fs/attr.c:552 chown_common+0x538/0x670 fs/open.c:782 do_fchownat+0x1ac/0x200 fs/open.c:813 __do_sys_lchown fs/open.c:838 [inline] __se_sys_lchown fs/open.c:836 [inline] __x64_sys_lchown+0x7e/0xc0 fs/open.c:836 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #4 (&ei->xattr_sem){++++}-{4:4}: down_read+0x9a/0x330 kernel/locking/rwsem.c:1524 ext4_setattr+0x7fb/0x2a70 fs/ext4/inode.c:5400 notify_change+0x6a9/0x1230 fs/attr.c:552 chown_common+0x538/0x670 fs/open.c:782 do_fchownat+0x1ac/0x200 fs/open.c:813 __do_sys_chown fs/open.c:833 [inline] __se_sys_chown fs/open.c:831 [inline] __x64_sys_chown+0x7b/0xc0 fs/open.c:831 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #3 (jbd2_handle){++++}-{0:0}: start_this_handle+0xf92/0x1430 fs/jbd2/transaction.c:448 jbd2__journal_start+0x394/0x6a0 fs/jbd2/transaction.c:505 jbd2_journal_start+0x29/0x40 fs/jbd2/transaction.c:544 ocfs2_start_trans+0x3b9/0x970 fs/ocfs2/journal.c:352 ocfs2_shutdown_local_alloc+0x283/0xa10 fs/ocfs2/localalloc.c:417 ocfs2_dismount_volume+0x1f1/0xa00 fs/ocfs2/super.c:1822 generic_shutdown_super+0x156/0x390 fs/super.c:642 kill_block_super+0x3b/0x90 fs/super.c:1710 deactivate_locked_super+0xc1/0x1a0 fs/super.c:473 deactivate_super+0xde/0x100 fs/super.c:506 cleanup_mnt+0x222/0x450 fs/namespace.c:1413 task_work_run+0x151/0x250 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (&journal->j_trans_barrier){.+.+}-{4:4}: down_read+0x9a/0x330 kernel/locking/rwsem.c:1524 ocfs2_start_trans+0x3ae/0x970 fs/ocfs2/journal.c:350 ocfs2_shutdown_local_alloc+0x283/0xa10 fs/ocfs2/localalloc.c:417 ocfs2_dismount_volume+0x1f1/0xa00 fs/ocfs2/super.c:1822 generic_shutdown_super+0x156/0x390 fs/super.c:642 kill_block_super+0x3b/0x90 fs/super.c:1710 deactivate_locked_super+0xc1/0x1a0 fs/super.c:473 deactivate_super+0xde/0x100 fs/super.c:506 cleanup_mnt+0x222/0x450 fs/namespace.c:1413 task_work_run+0x151/0x250 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x27b/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (sb_internal#4){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1773 [inline] sb_start_intwrite include/linux/fs.h:1956 [inline] ocfs2_start_trans+0x29d/0x970 fs/ocfs2/journal.c:348 ocfs2_expand_inline_dir.constprop.0+0x4df/0x41c0 fs/ocfs2/dir.c:2867 ocfs2_extend_dir+0x1e0/0x1c90 fs/ocfs2/dir.c:3199 ocfs2_prepare_dir_for_insert+0x12a7/0x1700 fs/ocfs2/dir.c:4304 ocfs2_symlink+0xb54/0x3a00 fs/ocfs2/namei.c:1872 vfs_symlink fs/namei.c:4671 [inline] vfs_symlink+0x3eb/0x660 fs/namei.c:4655 do_symlinkat+0x263/0x310 fs/namei.c:4697 __do_sys_symlink fs/namei.c:4718 [inline] __se_sys_symlink fs/namei.c:4716 [inline] __x64_sys_symlink+0x75/0x90 fs/namei.c:4716 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 down_write+0x93/0x200 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:865 [inline] ocfs2_reserve_local_alloc_bits+0xf1/0xc50 fs/ocfs2/localalloc.c:636 ocfs2_reserve_clusters_with_limit+0x697/0xe80 fs/ocfs2/suballoc.c:1166 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1227 [inline] ocfs2_lock_allocators+0x339/0x5f0 fs/ocfs2/suballoc.c:2746 ocfs2_extend_allocation+0x285/0x1770 fs/ocfs2/file.c:589 ocfs2_extend_no_holes+0x22a/0x4c0 fs/ocfs2/file.c:1027 ocfs2_acquire_dquot+0x4e0/0xaf0 fs/ocfs2/quota_global.c:853 dqget+0x694/0x1160 fs/quota/dquot.c:977 ocfs2_setattr+0x1d8f/0x2570 fs/ocfs2/file.c:1233 notify_change+0x6a9/0x1230 fs/attr.c:552 chown_common+0x538/0x670 fs/open.c:782 do_fchownat+0x1ac/0x200 fs/open.c:813 __do_sys_lchown fs/open.c:838 [inline] __se_sys_lchown fs/open.c:836 [inline] __x64_sys_lchown+0x7e/0xc0 fs/open.c:836 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6 --> &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7 --> &ocfs2_quota_ip_alloc_sem_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_quota_ip_alloc_sem_key); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7); lock(&ocfs2_quota_ip_alloc_sem_key); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#6); *** DEADLOCK *** 5 locks held by syz.8.7777/25148: #0: ffff8880288a8420 (sb_writers#29){.+.+}-{0:0}, at: do_fchownat+0x118/0x200 fs/open.c:810 #1: ffff88805247df40 (&type->i_mutex_dir_key#31){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:865 [inline] #1: ffff88805247df40 (&type->i_mutex_dir_key#31){+.+.}-{4:4}, at: chown_common+0x336/0x670 fs/open.c:772 #2: ffff88809788a0a8 (&dquot->dq_lock){+.+.}-{4:4}, at: ocfs2_acquire_dquot+0x24d/0xaf0 fs/ocfs2/quota_global.c:823 #3: ffff888052466d80 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:865 [inline] #3: ffff888052466d80 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{4:4}, at: ocfs2_lock_global_qf+0x195/0x2d0 fs/ocfs2/quota_global.c:313 #4: ffff888052466a20 (&ocfs2_quota_ip_alloc_sem_key){++++}-{4:4}, at: ocfs2_lock_global_qf+0x1c2/0x2d0 fs/ocfs2/quota_global.c:314 stack backtrace: CPU: 1 UID: 0 PID: 25148 Comm: syz.8.7777 Not tainted 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x490/0x760 kernel/locking/lockdep.c:2076 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 down_write+0x93/0x200 kernel/locking/rwsem.c:1577 inode_lock include/linux/fs.h:865 [inline] ocfs2_reserve_local_alloc_bits+0xf1/0xc50 fs/ocfs2/localalloc.c:636 ocfs2_reserve_clusters_with_limit+0x697/0xe80 fs/ocfs2/suballoc.c:1166 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1227 [inline] ocfs2_lock_allocators+0x339/0x5f0 fs/ocfs2/suballoc.c:2746 ocfs2_extend_allocation+0x285/0x1770 fs/ocfs2/file.c:589 ocfs2_extend_no_holes+0x22a/0x4c0 fs/ocfs2/file.c:1027 ocfs2_acquire_dquot+0x4e0/0xaf0 fs/ocfs2/quota_global.c:853 dqget+0x694/0x1160 fs/quota/dquot.c:977 ocfs2_setattr+0x1d8f/0x2570 fs/ocfs2/file.c:1233 notify_change+0x6a9/0x1230 fs/attr.c:552 chown_common+0x538/0x670 fs/open.c:782 do_fchownat+0x1ac/0x200 fs/open.c:813 __do_sys_lchown fs/open.c:838 [inline] __se_sys_lchown fs/open.c:836 [inline] __x64_sys_lchown+0x7e/0xc0 fs/open.c:836 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdcd978cda9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fdcda5c3038 EFLAGS: 00000246 ORIG_RAX: 000000000000005e RAX: ffffffffffffffda RBX: 00007fdcd99a5fa0 RCX: 00007fdcd978cda9 RDX: 0000000000000000 RSI: 000000000000ee00 RDI: 0000000020000040 RBP: 00007fdcd980e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fdcd99a5fa0 R15: 00007ffc9d47f6f8