====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/4189 is trying to acquire lock: ffff88805fafe0a8 (&dquot->dq_lock){+.+.}-{3:3} , at: dquot_commit+0x5a/0x410 fs/quota/dquot.c:532 but task is already holding lock: ffff88805fae8c70 (&ei->i_data_sem){++++}-{3:3}, at: ext4_truncate+0x994/0x1190 fs/ext4/inode.c:4258 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&ei->i_data_sem){++++}-{3:3} : down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 ext4_map_blocks+0x350/0x1a50 fs/ext4/inode.c:600 ext4_append+0x22d/0x560 fs/ext4/namei.c:75 ext4_init_new_dir+0x2a7/0x910 fs/ext4/namei.c:3032 ext4_mkdir+0x4c3/0xc90 fs/ext4/namei.c:3078 vfs_mkdir+0x386/0x570 fs/namei.c:4116 do_mkdirat+0x1dd/0x5c0 fs/namei.c:4141 __do_sys_mkdir fs/namei.c:4161 [inline] __se_sys_mkdir fs/namei.c:4159 [inline] __x64_sys_mkdir+0x6a/0x80 fs/namei.c:4159 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #4 (jbd2_handle){++++}-{0:0}: wait_transaction_locked+0x1bb/0x270 fs/jbd2/transaction.c:178 add_transaction_credits+0x104/0xcb0 fs/jbd2/transaction.c:242 start_this_handle+0x723/0x1560 fs/jbd2/transaction.c:423 jbd2__journal_start+0x2b7/0x5a0 fs/jbd2/transaction.c:521 jbd2_journal_start+0x26/0x30 fs/jbd2/transaction.c:560 ocfs2_start_trans+0x3b2/0x6f0 fs/ocfs2/journal.c:376 ocfs2_free_cached_clusters fs/ocfs2/alloc.c:6504 [inline] ocfs2_run_deallocs+0xf15/0x1560 fs/ocfs2/alloc.c:6567 ocfs2_commit_truncate+0x162b/0x1d30 fs/ocfs2/alloc.c:7368 ocfs2_truncate_file+0xd89/0x1540 fs/ocfs2/file.c:505 ocfs2_setattr+0x1545/0x1b40 fs/ocfs2/file.c:1215 notify_change+0xbc6/0xee0 fs/attr.c:505 do_truncate+0x1ac/0x240 fs/open.c:65 do_sys_ftruncate+0x31b/0x3d0 fs/open.c:193 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #3 (&journal->j_trans_barrier ){.+.+}-{3:3}: down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 ocfs2_start_trans+0x3a6/0x6f0 fs/ocfs2/journal.c:374 ocfs2_mknod+0xf34/0x2460 fs/ocfs2/namei.c:361 ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3513 [inline] open_last_lookups fs/namei.c:3583 [inline] path_openat+0x120a/0x2fb0 fs/namei.c:3790 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #2 (sb_internal #2){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1817 [inline] sb_start_intwrite include/linux/fs.h:1934 [inline] ocfs2_start_trans+0x2a7/0x6f0 fs/ocfs2/journal.c:372 ocfs2_acquire_dquot+0x6c0/0xb30 fs/ocfs2/quota_global.c:848 dqget+0x713/0xbb0 fs/quota/dquot.c:1010 __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1539 ocfs2_get_init_inode+0x144/0x1b0 fs/ocfs2/namei.c:202 ocfs2_mknod+0x90e/0x2460 fs/ocfs2/namei.c:311 ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3513 [inline] open_last_lookups fs/namei.c:3583 [inline] path_openat+0x120a/0x2fb0 fs/namei.c:3790 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (&ocfs2_quota_ip_alloc_sem_key){++++}-{3:3}: down_write+0x38/0x60 kernel/locking/rwsem.c:1551 ocfs2_create_local_dquot+0x199/0x18d0 fs/ocfs2/quota_local.c:1224 ocfs2_acquire_dquot+0x822/0xb30 fs/ocfs2/quota_global.c:871 dqget+0x713/0xbb0 fs/quota/dquot.c:1010 __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1539 ocfs2_get_init_inode+0x144/0x1b0 fs/ocfs2/namei.c:202 ocfs2_mknod+0x90e/0x2460 fs/ocfs2/namei.c:311 ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:676 lookup_open fs/namei.c:3513 [inline] open_last_lookups fs/namei.c:3583 [inline] path_openat+0x120a/0x2fb0 fs/namei.c:3790 do_filp_open+0x1df/0x400 fs/namei.c:3820 do_sys_openat2+0x14b/0x500 fs/open.c:1255 do_sys_open fs/open.c:1271 [inline] __do_sys_openat fs/open.c:1287 [inline] __se_sys_openat fs/open.c:1282 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1282 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&dquot->dq_lock ){+.+.}-{3:3} : check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 dquot_commit+0x5a/0x410 fs/quota/dquot.c:532 ext4_write_dquot+0x1f0/0x360 fs/ext4/super.c:6212 mark_dquot_dirty fs/quota/dquot.c:397 [inline] mark_all_dquot_dirty+0xf9/0x400 fs/quota/dquot.c:437 __dquot_free_space+0x7c3/0xb80 fs/quota/dquot.c:1964 dquot_free_space_nodirty include/linux/quotaops.h:369 [inline] dquot_free_space include/linux/quotaops.h:374 [inline] dquot_free_block include/linux/quotaops.h:385 [inline] ext4_mb_clear_bb fs/ext4/mballoc.c:6164 [inline] ext4_free_blocks+0x1b1b/0x24c0 fs/ext4/mballoc.c:6294 ext4_clear_blocks+0x37c/0x3f0 fs/ext4/indirect.c:895 ext4_free_data fs/ext4/indirect.c:969 [inline] ext4_ind_truncate+0x60e/0xbc0 fs/ext4/indirect.c:1161 ext4_truncate+0x9f8/0x1190 fs/ext4/inode.c:4265 ext4_evict_inode+0xb0f/0x1050 fs/ext4/inode.c:291 evict+0x4b2/0x9d0 fs/inode.c:644 d_delete_notify include/linux/fsnotify.h:267 [inline] vfs_rmdir+0x392/0x410 fs/namei.c:4213 do_rmdir+0x27f/0x710 fs/namei.c:4261 __do_sys_unlinkat fs/namei.c:4441 [inline] __se_sys_unlinkat fs/namei.c:4435 [inline] __x64_sys_unlinkat+0xc0/0xe0 fs/namei.c:4435 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: &dquot->dq_lock --> jbd2_handle --> &ei->i_data_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ei->i_data_sem ); lock( jbd2_handle); lock(&ei->i_data_sem ); lock(&dquot->dq_lock); *** DEADLOCK *** 5 locks held by syz-executor/4189: #0: ffff888073b2c460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386 #1: ffff888074f153b0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:828 [inline] #1: ffff888074f153b0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: do_rmdir+0x1b0/0x710 fs/namei.c:4248 #2: ffff888073b2c650 (sb_internal){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1817 [inline] #2: ffff888073b2c650 (sb_internal){.+.+}-{0:0}, at: sb_start_intwrite include/linux/fs.h:1934 [inline] #2: ffff888073b2c650 (sb_internal){.+.+}-{0:0}, at: ext4_evict_inode+0x41f/0x1050 fs/ext4/inode.c:245 #3: ffff88805fae8c70 (&ei->i_data_sem){++++}-{3:3} , at: ext4_truncate+0x994/0x1190 fs/ext4/inode.c:4258 #4: ffffffff8d241738 (dquot_srcu){....}-{0:0}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:312 stack backtrace: CPU: 1 PID: 4189 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 dquot_commit+0x5a/0x410 fs/quota/dquot.c:532 ext4_write_dquot+0x1f0/0x360 fs/ext4/super.c:6212 mark_dquot_dirty fs/quota/dquot.c:397 [inline] mark_all_dquot_dirty+0xf9/0x400 fs/quota/dquot.c:437 __dquot_free_space+0x7c3/0xb80 fs/quota/dquot.c:1964 dquot_free_space_nodirty include/linux/quotaops.h:369 [inline] dquot_free_space include/linux/quotaops.h:374 [inline] dquot_free_block include/linux/quotaops.h:385 [inline] ext4_mb_clear_bb fs/ext4/mballoc.c:6164 [inline] ext4_free_blocks+0x1b1b/0x24c0 fs/ext4/mballoc.c:6294 ext4_clear_blocks+0x37c/0x3f0 fs/ext4/indirect.c:895 ext4_free_data fs/ext4/indirect.c:969 [inline] ext4_ind_truncate+0x60e/0xbc0 fs/ext4/indirect.c:1161 ext4_truncate+0x9f8/0x1190 fs/ext4/inode.c:4265 ext4_evict_inode+0xb0f/0x1050 fs/ext4/inode.c:291 evict+0x4b2/0x9d0 fs/inode.c:644 d_delete_notify include/linux/fsnotify.h:267 [inline] vfs_rmdir+0x392/0x410 fs/namei.c:4213 do_rmdir+0x27f/0x710 fs/namei.c:4261 __do_sys_unlinkat fs/namei.c:4441 [inline] __se_sys_unlinkat fs/namei.c:4435 [inline] __x64_sys_unlinkat+0xc0/0xe0 fs/namei.c:4435 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f7191b6c677 Code: 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 b8 07 01 00 00 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:00007ffee7490a38 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007f7191b6c677 RDX: 0000000000000200 RSI: 00007ffee7491be0 RDI: 00000000ffffff9c RBP: 00007f7191c03f93 R08: 0000000000008550 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000207 R12: 00007ffee7491be0 R13: 00007f7191c03f93 R14: 0000000000016b41 R15: 00007ffee7493da0 kernfs delayed_allocation_blocks: removing kernfs session_write_kbytes: removing kernfs lifetime_write_kbytes: removing kernfs reserved_clusters: removing kernfs sra_exceeded_retry_limit: removing kernfs inode_readahead_blks: removing kernfs inode_goal: removing kernfs mb_stats: removing kernfs mb_max_to_scan: removing kernfs mb_min_to_scan: removing kernfs mb_order2_req: removing kernfs mb_stream_req: removing kernfs mb_group_prealloc: removing kernfs mb_max_inode_prealloc: removing kernfs mb_max_linear_groups: removing kernfs max_writeback_mb_bump: removing kernfs extent_max_zeroout_kb: removing kernfs trigger_fs_error: removing kernfs err_ratelimit_interval_ms: removing kernfs err_ratelimit_burst: removing kernfs warning_ratelimit_interval_ms: removing kernfs warning_ratelimit_burst: removing kernfs msg_ratelimit_interval_ms: removing kernfs msg_ratelimit_burst: removing kernfs errors_count: removing kernfs warning_count: removing kernfs msg_count: removing kernfs first_error_ino: removing kernfs last_error_ino: removing kernfs first_error_block: removing kernfs last_error_block: removing kernfs first_error_line: removing kernfs last_error_line: removing kernfs first_error_func: removing kernfs last_error_func: removing kernfs first_error_errcode: removing kernfs last_error_errcode: removing kernfs first_error_time: removing kernfs last_error_time: removing kernfs journal_task: removing kernfs mb_prefetch: removing kernfs mb_prefetch_limit: removing kernfs loop1: removing kobject: 'loop1' (ffff888073b2e2d0): kobject_cleanup, parent 0000000000000000 kobject: 'loop1' (ffff888073b2e2d0): calling ktype release kobject: 'loop1': free name kernfs backing_file: removing kernfs offset: removing kernfs sizelimit: removing kernfs autoclear: removing kernfs partscan: removing kernfs dio: removing kernfs loop: removing kobject: 'loop1' (ffff88814088d280): kobject_uevent_env kobject: 'loop1' (ffff88814088d280): fill_kobj_path: path = '/devices/virtual/block/loop1' kobject: 'loop1' (ffff88814088d280): kobject_uevent_env kobject: 'loop1' (ffff88814088d280): fill_kobj_path: path = '/devices/virtual/block/loop1'