====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.4.1186/7905 is trying to acquire lock: ffff0000ff1ac650 (sb_internal#3){.+.+}-{0:0}, at: ocfs2_acquire_dquot+0x5d0/0xab0 fs/ocfs2/quota_global.c:848 but task is already holding lock: ffff0000e21e5be0 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_lock_global_qf+0x1ac/0x23c fs/ocfs2/quota_global.c:314 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}: down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 ocfs2_lock_global_qf+0x1ac/0x23c fs/ocfs2/quota_global.c:314 ocfs2_acquire_dquot+0x260/0xab0 fs/ocfs2/quota_global.c:816 dqget+0x638/0xa98 fs/quota/dquot.c:1013 dquot_get_next_dqblk+0xb4/0x340 fs/quota/dquot.c:2745 quota_getnextquota+0x258/0x494 fs/quota/quota.c:250 do_quotactl+0x41c/0x738 fs/quota/quota.c:800 __do_sys_quotactl fs/quota/quota.c:960 [inline] __se_sys_quotactl fs/quota/quota.c:916 [inline] __arm64_sys_quotactl+0x2dc/0x77c fs/quota/quota.c:916 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x200/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 -> #4 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}: down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:764 [inline] ocfs2_lock_global_qf+0x190/0x23c fs/ocfs2/quota_global.c:313 ocfs2_acquire_dquot+0x260/0xab0 fs/ocfs2/quota_global.c:816 dqget+0x638/0xa98 fs/quota/dquot.c:1013 dquot_get_next_dqblk+0xb4/0x340 fs/quota/dquot.c:2745 quota_getnextquota+0x258/0x494 fs/quota/quota.c:250 do_quotactl+0x41c/0x738 fs/quota/quota.c:800 __do_sys_quotactl fs/quota/quota.c:960 [inline] __se_sys_quotactl fs/quota/quota.c:916 [inline] __arm64_sys_quotactl+0x2dc/0x77c fs/quota/quota.c:916 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x200/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 -> #3 (&dquot->dq_lock){+.+.}-{3:3}: __mutex_lock_common+0x1a0/0x1f88 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 dquot_acquire+0x60/0x4b8 fs/quota/dquot.c:488 ext4_acquire_dquot+0x270/0x420 fs/ext4/super.c:6844 dqget+0x638/0xa98 fs/quota/dquot.c:1013 __dquot_initialize+0x2e4/0xb30 fs/quota/dquot.c:1542 dquot_initialize+0x24/0x34 fs/quota/dquot.c:1604 ext4_create+0x9c/0x410 fs/ext4/namei.c:2878 lookup_open fs/namei.c:3533 [inline] open_last_lookups fs/namei.c:3601 [inline] path_openat+0xda8/0x27a0 fs/namei.c:3835 do_filp_open+0x198/0x38c fs/namei.c:3865 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __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 -> #2 (jbd2_handle){++++}-{0:0}: wait_transaction_locked+0x184/0x23c fs/jbd2/transaction.c:177 add_transaction_credits+0x104/0xaf0 fs/jbd2/transaction.c:-1 start_this_handle+0x4dc/0x125c fs/jbd2/transaction.c:422 jbd2__journal_start+0x288/0x530 fs/jbd2/transaction.c:520 jbd2_journal_start+0x3c/0x4c fs/jbd2/transaction.c:559 ocfs2_start_trans+0x398/0x6f4 fs/ocfs2/journal.c:376 ocfs2_remove_inode fs/ocfs2/inode.c:713 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:867 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1128 [inline] ocfs2_evict_inode+0x1ae8/0x3df0 fs/ocfs2/inode.c:1268 evict+0x3d8/0x81c fs/inode.c:703 iput_final fs/inode.c:1832 [inline] iput+0x728/0x7e8 fs/inode.c:1858 d_delete_notify include/linux/fsnotify.h:267 [inline] vfs_rmdir+0x32c/0x438 fs/namei.c:4259 do_rmdir+0x244/0x524 fs/namei.c:4307 __do_sys_unlinkat fs/namei.c:4487 [inline] __se_sys_unlinkat fs/namei.c:4481 [inline] __arm64_sys_unlinkat+0xcc/0xfc fs/namei.c:4481 __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 (&journal->j_trans_barrier){.+.+}-{3:3}: down_read+0x64/0x300 kernel/locking/rwsem.c:1520 ocfs2_start_trans+0x38c/0x6f4 fs/ocfs2/journal.c:374 ocfs2_mknod+0xd20/0x212c fs/ocfs2/namei.c:361 ocfs2_mkdir+0x19c/0x51c fs/ocfs2/namei.c:659 vfs_mkdir+0x314/0x4d8 fs/namei.c:4161 do_mkdirat+0x1b8/0x3ec fs/namei.c:4186 __do_sys_mkdirat fs/namei.c:4201 [inline] __se_sys_mkdirat fs/namei.c:4199 [inline] __arm64_sys_mkdirat+0x90/0xa8 fs/namei.c:4199 __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_internal#3){.+.+}-{0:0}: 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 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+0x20c/0x6f4 fs/ocfs2/journal.c:372 ocfs2_acquire_dquot+0x5d0/0xab0 fs/ocfs2/quota_global.c:848 dqget+0x638/0xa98 fs/quota/dquot.c:1013 dquot_get_next_dqblk+0xb4/0x340 fs/quota/dquot.c:2745 quota_getnextquota+0x258/0x494 fs/quota/quota.c:250 do_quotactl+0x41c/0x738 fs/quota/quota.c:800 __do_sys_quotactl fs/quota/quota.c:960 [inline] __se_sys_quotactl fs/quota/quota.c:916 [inline] __arm64_sys_quotactl+0x2dc/0x77c fs/quota/quota.c:916 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x200/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_internal#3 --> &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); rlock(sb_internal#3); *** DEADLOCK *** 4 locks held by syz.4.1186/7905: #0: ffff0000ff1ac0e0 (&type->s_umount_key#65){++++}-{3:3}, at: user_get_super+0x118/0x238 fs/super.c:889 #1: ffff0000f86a00a8 (&dquot->dq_lock){+.+.}-{3:3}, at: ocfs2_acquire_dquot+0x254/0xab0 fs/ocfs2/quota_global.c:811 #2: ffff0000e21e5f48 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #2: ffff0000e21e5f48 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#7){+.+.}-{3:3}, at: ocfs2_lock_global_qf+0x190/0x23c fs/ocfs2/quota_global.c:313 #3: ffff0000e21e5be0 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_lock_global_qf+0x1ac/0x23c fs/ocfs2/quota_global.c:314 stack backtrace: CPU: 1 PID: 7905 Comm: syz.4.1186 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 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+0x20c/0x6f4 fs/ocfs2/journal.c:372 ocfs2_acquire_dquot+0x5d0/0xab0 fs/ocfs2/quota_global.c:848 dqget+0x638/0xa98 fs/quota/dquot.c:1013 dquot_get_next_dqblk+0xb4/0x340 fs/quota/dquot.c:2745 quota_getnextquota+0x258/0x494 fs/quota/quota.c:250 do_quotactl+0x41c/0x738 fs/quota/quota.c:800 __do_sys_quotactl fs/quota/quota.c:960 [inline] __se_sys_quotactl fs/quota/quota.c:916 [inline] __arm64_sys_quotactl+0x2dc/0x77c fs/quota/quota.c:916 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x200/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