syzbot


possible deadlock in ext4_map_blocks (3)

Status: upstream: reported on 2026/05/19 05:54
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+1d62d734f435d85cc693@syzkaller.appspotmail.com
First crash: 5d04h, last: 5d04h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ext4?] possible deadlock in ext4_map_blocks (3) 0 (1) 2026/05/19 05:54
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ext4_map_blocks (2) ext4 4 14 488d 532d 0/29 closed as dup on 2024/12/12 23:41
linux-6.1 possible deadlock in ext4_map_blocks origin:lts-only 4 C inconclusive 681 1d09h 1169d 0/3 upstream: reported C repro on 2023/03/08 04:51
linux-4.19 possible deadlock in ext4_map_blocks ext4 4 11 1178d 1315d 0/1 upstream: reported on 2022/10/12 20:37
upstream possible deadlock in ext4_map_blocks ext4 4 480 1102d 1323d 0/29 auto-obsoleted due to no activity on 2023/08/11 20:48
linux-5.15 possible deadlock in ext4_map_blocks origin:lts-only 4 C done 643 3d07h 1165d 0/3 upstream: reported C repro on 2023/03/11 16:28

Sample crash report:
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
syz.4.1400/19208 is trying to acquire lock:
ffff888040b26cd0 (&ei->i_data_sem/2){++++}-{4:4}, at: ext4_map_blocks+0x7b5/0x11d0 fs/ext4/inode.c:823

but task is already holding lock:
ffff888040b231c0 (&ei->i_data_sem/2){++++}-{4:4}, at: ext4_map_blocks+0x7b5/0x11d0 fs/ext4/inode.c:823

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&ei->i_data_sem/2);
  lock(&ei->i_data_sem/2);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

6 locks held by syz.4.1400/19208:
 #0: ffff888025696480 (sb_writers#4){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2724 [inline]
 #0: ffff888025696480 (sb_writers#4){.+.+}-{0:0}, at: vfs_write+0x22d/0xba0 fs/read_write.c:684
 #1: ffff888040b23360 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline]
 #1: ffff888040b23360 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: ext4_buffered_write_iter+0xa1/0x3a0 fs/ext4/file.c:311
 #2: ffff888040b231c0 (&ei->i_data_sem/2){++++}-{4:4}, at: ext4_map_blocks+0x7b5/0x11d0 fs/ext4/inode.c:823
 #3: ffffffff8e170dd8 (dquot_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:187 [inline]
 #3: ffffffff8e170dd8 (dquot_srcu){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:294 [inline]
 #3: ffffffff8e170dd8 (dquot_srcu){.+.+}-{0:0}, at: __dquot_alloc_space+0x18d/0xea0 fs/quota/dquot.c:1729
 #4: ffff888062ce2a98 (&dquot->dq_lock){+.+.}-{4:4}, at: dquot_commit+0x5e/0x450 fs/quota/dquot.c:533
 #5: ffff8880256961e8 (&s->s_dquot.dqio_sem){++++}-{4:4}, at: v2_write_dquot+0x9c/0x260 fs/quota/quota_v2.c:369

stack backtrace:
CPU: 1 UID: 0 PID: 19208 Comm: syz.4.1400 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_deadlock_bug+0x279/0x290 kernel/locking/lockdep.c:3041
 check_deadlock kernel/locking/lockdep.c:3093 [inline]
 validate_chain kernel/locking/lockdep.c:3895 [inline]
 __lock_acquire+0x253f/0x2cf0 kernel/locking/lockdep.c:5237
 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868
 down_write+0x3a/0x50 kernel/locking/rwsem.c:1625
 ext4_map_blocks+0x7b5/0x11d0 fs/ext4/inode.c:823
 ext4_getblk+0x1ca/0x780 fs/ext4/inode.c:992
 ext4_bread+0x2a/0x180 fs/ext4/inode.c:1055
 ext4_quota_write+0x239/0x580 fs/ext4/super.c:7398
 qtree_write_dquot+0x25b/0x5e0 fs/quota/quota_tree.c:462
 v2_write_dquot+0x183/0x260 fs/quota/quota_v2.c:372
 dquot_commit+0x377/0x450 fs/quota/dquot.c:540
 ext4_write_dquot+0x20a/0x380 fs/ext4/super.c:7010
 mark_dquot_dirty fs/quota/dquot.c:398 [inline]
 mark_all_dquot_dirty+0x205/0x460 fs/quota/dquot.c:438
 __dquot_alloc_space+0x620/0xea0 fs/quota/dquot.c:1765
 dquot_alloc_space_nodirty include/linux/quotaops.h:292 [inline]
 dquot_alloc_space include/linux/quotaops.h:305 [inline]
 dquot_alloc_block include/linux/quotaops.h:329 [inline]
 ext4_mb_new_blocks+0xfb1/0x46d0 fs/ext4/mballoc.c:6276
 ext4_ext_map_blocks+0x1515/0x5860 fs/ext4/extents.c:4461
 ext4_map_create_blocks+0x11d/0x540 fs/ext4/inode.c:631
 ext4_map_blocks+0x7cd/0x11d0 fs/ext4/inode.c:824
 _ext4_get_block+0x1e3/0x470 fs/ext4/inode.c:924
 ext4_get_block_unwritten+0x2e/0x100 fs/ext4/inode.c:957
 ext4_block_write_begin+0xb14/0x1950 fs/ext4/inode.c:1211
 ext4_write_begin+0xb40/0x1890 fs/ext4/ext4_jbd2.h:-1
 ext4_da_write_begin+0x355/0xd60 fs/ext4/inode.c:3152
 generic_perform_write+0x2af/0x8b0 mm/filemap.c:4325
 ext4_buffered_write_iter+0xd0/0x3a0 fs/ext4/file.c:316
 ext4_file_write_iter+0x299/0x1c10 fs/ext4/file.c:-1
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x629/0xba0 fs/read_write.c:688
 ksys_pwrite64 fs/read_write.c:795 [inline]
 __do_sys_pwrite64 fs/read_write.c:803 [inline]
 __se_sys_pwrite64 fs/read_write.c:800 [inline]
 __x64_sys_pwrite64+0x19c/0x230 fs/read_write.c:800
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f50b506ce59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f50b32be028 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007f50b52e5fa0 RCX: 00007f50b506ce59
RDX: 0000000000000001 RSI: 0000200000000140 RDI: 0000000000000007
RBP: 00007f50b5102d6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000008080c61 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f50b52e6038 R14: 00007f50b52e5fa0 R15: 00007fff20f29238
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/15 05:49 upstream 66182ca873a4 6ccb967e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in ext4_map_blocks
* Struck through repros no longer work on HEAD.