possible deadlock in dquot_acquire

Status: upstream: reported on 2026/11/14 17:05
Reported-by: syzbot+87048b06e106c2ed501a@syzkaller.appspotmail.com
First crash: 16d, last: 3h58m
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in dquot_acquire 4 24 23h30m 18d 0/3 upstream: reported on 2026/11/12 09:27

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.5.390/6306 is trying to acquire lock:
ffff88804f7840a8 (&dquot->dq_lock){+.+.}-{3:3}, at: dquot_acquire+0x63/0x520 fs/quota/dquot.c:485

but task is already holding lock:
ffff88805a258990 (jbd2_handle){++++}-{0:0}
, at: start_this_handle+0x12d5/0x1560 fs/jbd2/transaction.c:462

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #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:386
       ocfs2_write_begin_nolock+0x294f/0x44b0 fs/ocfs2/aops.c:1773
       ocfs2_write_begin+0x1b4/0x310 fs/ocfs2/aops.c:1907
       generic_perform_write+0x2b6/0x550 mm/filemap.c:3793
       __generic_file_write_iter+0x261/0x4e0 mm/filemap.c:3920
       ocfs2_file_write_iter+0x156d/0x1e90 fs/ocfs2/file.c:2503
       call_write_iter include/linux/fs.h:2181 [inline]
       new_sync_write fs/read_write.c:507 [inline]
       vfs_write+0x748/0xd70 fs/read_write.c:594
       ksys_write+0x153/0x260 fs/read_write.c:647
       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:384
       ocfs2_mknod+0xf20/0x2460 fs/ocfs2/namei.c:360
       ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:675
       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#6){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1819 [inline]
       sb_start_intwrite include/linux/fs.h:1936 [inline]
       ocfs2_start_trans+0x2a7/0x6f0 fs/ocfs2/journal.c:382
       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+0x8f5/0x2460 fs/ocfs2/namei.c:310
       ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:675
       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:1254
       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+0x8f5/0x2460 fs/ocfs2/namei.c:310
       ocfs2_create+0x192/0x420 fs/ocfs2/namei.c:675
       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:3125 [inline]
       check_prevs_add kernel/locking/lockdep.c:3244 [inline]
       validate_chain kernel/locking/lockdep.c:3860 [inline]
       __lock_acquire+0x39b7/0x7e20 kernel/locking/lockdep.c:5134
       lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5751
       __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_acquire+0x63/0x520 fs/quota/dquot.c:485
       ext4_acquire_dquot+0x2e3/0x4a0 fs/ext4/super.c:6263
       dqget+0x713/0xbb0 fs/quota/dquot.c:1010
       __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1539
       ext4_mkdir+0x198/0xc90 fs/ext4/namei.c:3061
       vfs_mkdir+0x386/0x570 fs/namei.c:4116
       do_mkdirat+0x1dd/0x5c0 fs/namei.c:4141
       __do_sys_mkdirat fs/namei.c:4156 [inline]
       __se_sys_mkdirat fs/namei.c:4154 [inline]
       __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4154
       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 --> &journal->j_trans_barrier --> jbd2_handle


 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(jbd2_handle);
                               lock(&journal->j_trans_barrier);
                               lock(jbd2_handle);
  lock(&dquot->dq_lock);

 *** DEADLOCK ***

3 locks held by syz.5.390/6306:
 #0: ffff888055c84460
 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3d/0x90 fs/namespace.c:386
 #1: ffff88805a5b97e0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}
, at: inode_lock_nested include/linux/fs.h:830 [inline]
, at: filename_create+0x20b/0x450 fs/namei.c:3886
 #2: ffff88805a258990
 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x12d5/0x1560 fs/jbd2/transaction.c:462

stack backtrace:
CPU: 0 PID: 6306 Comm: syz.5.390 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 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:3125 [inline]
 check_prevs_add kernel/locking/lockdep.c:3244 [inline]
 validate_chain kernel/locking/lockdep.c:3860 [inline]
 __lock_acquire+0x39b7/0x7e20 kernel/locking/lockdep.c:5134
 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5751
 __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_acquire+0x63/0x520 fs/quota/dquot.c:485
 ext4_acquire_dquot+0x2e3/0x4a0 fs/ext4/super.c:6263
 dqget+0x713/0xbb0 fs/quota/dquot.c:1010
 __dquot_initialize+0x3a9/0xd00 fs/quota/dquot.c:1539
 ext4_mkdir+0x198/0xc90 fs/ext4/namei.c:3061
 vfs_mkdir+0x386/0x570 fs/namei.c:4116
 do_mkdirat+0x1dd/0x5c0 fs/namei.c:4141
 __do_sys_mkdirat fs/namei.c:4156 [inline]
 __se_sys_mkdirat fs/namei.c:4154 [inline]
 __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4154
 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:0x7f86ef9399c7
Code: 00 66 90 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 db f7 ff ff 66 2e 0f 1f 84 00 00 00 00 00 90 b8 02 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:00007f86edb86e58 EFLAGS: 00000246
 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f86edb86ee0 RCX: 00007f86ef9399c7
RDX: 00000000000001ff RSI: 00002000000095c0 RDI: 00000000ffffff9c
RBP: 0000200000009580 R08: 0000000000000005 R09: 0000200000009600
R10: 0000200000009580 R11: 0000000000000246 R12: 00002000000095c0
R13: 00007f86edb86ea0 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
kcov: kcov_task_exit: t = ffff8880272fd940, kcov->t = ffff8880272fd940

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/30 19:39 linux-5.15.y 4f2df9a01754 ba8e13b2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
2026/11/30 19:12 linux-5.15.y 4f2df9a01754 ba8e13b2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
2026/11/28 15:50 linux-5.15.y 4f2df9a01754 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
2026/11/27 08:21 linux-5.15.y 4f2df9a01754 f1f6b8bf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
2026/11/27 08:19 linux-5.15.y 4f2df9a01754 f1f6b8bf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
2026/11/19 10:27 linux-5.15.y 29c6cdaac04a f138241c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
2026/11/14 17:04 linux-5.15.y 29c6cdaac04a 819ebe34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan possible deadlock in dquot_acquire
* Struck through repros no longer work on HEAD.