====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.513/7393 is trying to acquire lock: ffff0000d2ee6990 (jbd2_handle){++++}-{0:0}, at: jbd2_journal_lock_updates+0x80/0x318 fs/jbd2/transaction.c:879 but task is already holding lock: ffff000109619808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] ffff000109619808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6075 [inline] ffff000109619808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: ocfs2_try_to_free_truncate_log+0x170/0x2f4 fs/ocfs2/alloc.c:6135 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}: down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 inode_lock include/linux/fs.h:764 [inline] ocfs2_try_to_free_truncate_log+0xb4/0x2f4 fs/ocfs2/alloc.c:6124 ocfs2_reserve_clusters_with_limit+0x3b4/0xa3c fs/ocfs2/suballoc.c:1202 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1245 [inline] ocfs2_lock_allocators+0x270/0x530 fs/ocfs2/suballoc.c:2701 ocfs2_extend_allocation+0x37c/0x1760 fs/ocfs2/file.c:585 ocfs2_extend_no_holes+0x1a4/0x438 fs/ocfs2/file.c:1027 ocfs2_expand_nonsparse_inode+0x134/0x3b0 fs/ocfs2/aops.c:1623 ocfs2_write_begin_nolock+0xea4/0x3a80 fs/ocfs2/aops.c:1689 ocfs2_write_begin+0x1b4/0x318 fs/ocfs2/aops.c:1906 generic_perform_write+0x240/0x508 mm/filemap.c:3862 __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960 ocfs2_file_write_iter+0x13ac/0x1cd0 fs/ocfs2/file.c:2469 __kernel_write_iter+0x1ec/0x54c fs/read_write.c:517 dump_emit_page fs/coredump.c:950 [inline] dump_user_range+0x2ac/0x568 fs/coredump.c:977 elf_core_dump+0x2900/0x2e14 fs/binfmt_elf.c:2354 do_coredump+0x113c/0x1e54 fs/coredump.c:824 get_signal+0xdfc/0x133c kernel/signal.c:2870 do_signal arch/arm64/kernel/signal.c:1110 [inline] do_notify_resume+0x2a8/0x2c84 arch/arm64/kernel/signal.c:1163 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_da+0xbc/0x14c arch/arm64/kernel/entry-common.c:516 el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:589 -> #2 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}: down_write+0x5c/0x88 kernel/locking/rwsem.c:1573 ocfs2_create_local_dquot+0x140/0x1444 fs/ocfs2/quota_local.c:1224 ocfs2_acquire_dquot+0x6dc/0xab0 fs/ocfs2/quota_global.c:871 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 ocfs2_get_init_inode+0x140/0x1b4 fs/ocfs2/namei.c:202 ocfs2_mknod+0x7f8/0x212c fs/ocfs2/namei.c:311 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 -> #1 (&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 -> #0 (jbd2_handle){++++}-{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 jbd2_journal_lock_updates+0xa8/0x318 fs/jbd2/transaction.c:880 __ocfs2_flush_truncate_log+0x268/0x10a4 fs/ocfs2/alloc.c:6029 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6076 [inline] ocfs2_try_to_free_truncate_log+0x178/0x2f4 fs/ocfs2/alloc.c:6135 ocfs2_write_begin_nolock+0x2a44/0x3a80 fs/ocfs2/aops.c:1872 ocfs2_write_begin+0x1b4/0x318 fs/ocfs2/aops.c:1906 generic_perform_write+0x240/0x508 mm/filemap.c:3862 __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960 ocfs2_file_write_iter+0x13ac/0x1cd0 fs/ocfs2/file.c:2469 __kernel_write_iter+0x1ec/0x54c fs/read_write.c:517 dump_emit_page fs/coredump.c:950 [inline] dump_user_range+0x2ac/0x568 fs/coredump.c:977 elf_core_dump+0x2900/0x2e14 fs/binfmt_elf.c:2354 do_coredump+0x113c/0x1e54 fs/coredump.c:824 get_signal+0xdfc/0x133c kernel/signal.c:2870 do_signal arch/arm64/kernel/signal.c:1110 [inline] do_notify_resume+0x2a8/0x2c84 arch/arm64/kernel/signal.c:1163 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_da+0xbc/0x14c arch/arm64/kernel/entry-common.c:516 el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:589 other info that might help us debug this: Chain exists of: jbd2_handle --> &ocfs2_quota_ip_alloc_sem_key --> &ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2); lock(&ocfs2_quota_ip_alloc_sem_key); lock(&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2); lock(jbd2_handle); *** DEADLOCK *** 4 locks held by syz.0.513/7393: #0: ffff0000cc8e0460 (sb_writers#22){.+.+}-{0:0}, at: do_coredump+0x1118/0x1e54 fs/coredump.c:823 #1: ffff0000e1f7c2c8 (&sb->s_type->i_mutex_key#28){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #1: ffff0000e1f7c2c8 (&sb->s_type->i_mutex_key#28){+.+.}-{3:3}, at: ocfs2_file_write_iter+0x3ac/0x1cd0 fs/ocfs2/file.c:2399 #2: ffff0000e1f7bf60 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}, at: ocfs2_write_begin+0x190/0x318 fs/ocfs2/aops.c:1904 #3: ffff000109619808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline] #3: ffff000109619808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6075 [inline] #3: ffff000109619808 (&ocfs2_sysfile_lock_key[args->fi_sysfile_type]#2){+.+.}-{3:3}, at: ocfs2_try_to_free_truncate_log+0x170/0x2f4 fs/ocfs2/alloc.c:6135 stack backtrace: CPU: 0 PID: 7393 Comm: syz.0.513 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 jbd2_journal_lock_updates+0xa8/0x318 fs/jbd2/transaction.c:880 __ocfs2_flush_truncate_log+0x268/0x10a4 fs/ocfs2/alloc.c:6029 ocfs2_flush_truncate_log fs/ocfs2/alloc.c:6076 [inline] ocfs2_try_to_free_truncate_log+0x178/0x2f4 fs/ocfs2/alloc.c:6135 ocfs2_write_begin_nolock+0x2a44/0x3a80 fs/ocfs2/aops.c:1872 ocfs2_write_begin+0x1b4/0x318 fs/ocfs2/aops.c:1906 generic_perform_write+0x240/0x508 mm/filemap.c:3862 __generic_file_write_iter+0x130/0x250 mm/filemap.c:3960 ocfs2_file_write_iter+0x13ac/0x1cd0 fs/ocfs2/file.c:2469 __kernel_write_iter+0x1ec/0x54c fs/read_write.c:517 dump_emit_page fs/coredump.c:950 [inline] dump_user_range+0x2ac/0x568 fs/coredump.c:977 elf_core_dump+0x2900/0x2e14 fs/binfmt_elf.c:2354 do_coredump+0x113c/0x1e54 fs/coredump.c:824 get_signal+0xdfc/0x133c kernel/signal.c:2870 do_signal arch/arm64/kernel/signal.c:1110 [inline] do_notify_resume+0x2a8/0x2c84 arch/arm64/kernel/signal.c:1163 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_da+0xbc/0x14c arch/arm64/kernel/entry-common.c:516 el0t_64_sync_handler+0x90/0xf0 arch/arm64/kernel/entry-common.c:658 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:589 ocfs2: Unmounting device (7,0) on (node local)