KCSAN: data-race in __filemap_add_folio / invalidate_bdev (12)

Status: moderation: reported on 2026/07/26 09:52
Subsystems: mm fs
Labels: race:benign prio:high
[Documentation on labels]
Reported-by: syzbot+e0624b5bf72b99131402@syzkaller.appspotmail.com
First crash: 47d, last: 6d15h
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
d064820b assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ✅ VMHostTrigger: ❌ KCSAN: data-race in __filemap_add_folio / invalidate_bdev (12) 2026/07/28 00:55 2026/07/28 00:55 2026/07/28 01:12 4cb2b096
7b2d2691 assessment-kcsan Benign: ✅ KCSAN: data-race in __filemap_add_folio / invalidate_bdev (12) 2026/07/26 09:52 2026/07/26 09:52 2026/07/26 10:20 492bab15
Similar bugs (11)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev mm fs 6 3 1541d 1576d 0/29 auto-closed as invalid on 2022/07/28 00:49
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (4) fs mm 6 4 1118d 1148d 0/29 auto-obsoleted due to no activity on 2023/09/24 05:15
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (5) fs mm 6 4 983d 1004d 0/29 auto-obsoleted due to no activity on 2024/02/05 20:23
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (3) block 6 1 1243d 1236d 0/29 auto-obsoleted due to no activity on 2023/05/21 22:53
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (10) fs mm 6 4 290d 376d 0/29 auto-obsoleted due to no activity on 2026/01/20 06:58
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (11) prio:low fs mm 6 3 127d 205d 0/29 auto-obsoleted due to no activity on 2026/07/01 21:20
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (2) mm fs 6 2 1445d 1471d 0/29 auto-obsoleted due to no activity on 2022/11/01 13:37
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (8) fs mm 6 2 545d 550d 0/29 auto-obsoleted due to no activity on 2025/05/09 19:21
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (9) fs mm 6 1 443d 443d 0/29 auto-obsoleted due to no activity on 2025/08/20 03:26
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (6) fs mm 6 1 901d 901d 0/29 auto-obsoleted due to no activity on 2024/04/28 09:19
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (7) mm fs 6 1 653d 653d 0/29 auto-obsoleted due to no activity on 2025/01/22 09:36

Sample crash report:
loop2: detected capacity change from 0 to 256
vfat: Unknown parameter '00000000000000000000003'
loop2: detected capacity change from 0 to 512
EXT4-fs (loop2): couldn't mount as ext3 due to feature incompatibilities
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / invalidate_bdev

read-write to 0xffff8881005f0578 of 8 bytes by task 8384 on cpu 0:
 __filemap_add_folio+0x6b7/0x910 mm/filemap.c:919
 filemap_add_folio+0x1cd/0x380 mm/filemap.c:972
 page_cache_ra_unbounded+0x1a4/0x3a0 mm/readahead.c:293
 do_page_cache_ra mm/readahead.c:348 [inline]
 force_page_cache_ra+0x190/0x1d0 mm/readahead.c:378
 page_cache_sync_ra+0x11d/0x560 mm/readahead.c:602
 filemap_get_pages+0x2f2/0x1360 mm/filemap.c:2714
 filemap_read+0x219/0xa20 mm/filemap.c:2824
 blkdev_read_iter+0x21e/0x2d0 block/fops.c:832
 new_sync_read fs/read_write.c:493 [inline]
 vfs_read+0x699/0x7c0 fs/read_write.c:574
 ksys_read+0xdc/0x1a0 fs/read_write.c:716
 __do_sys_read fs/read_write.c:725 [inline]
 __se_sys_read fs/read_write.c:723 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:723
 x64_sys_call+0x2135/0x2550 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881005f0578 of 8 bytes by task 12186 on cpu 1:
 invalidate_bdev+0x25/0x70 block/bdev.c:98
 __ext4_fill_super fs/ext4/super.c:5830 [inline]
 ext4_fill_super+0x2ccb/0x37b0 fs/ext4/super.c:5855
 get_tree_bdev_flags+0x291/0x300 fs/super.c:1887
 get_tree_bdev+0x1f/0x30 fs/super.c:1910
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5887
 vfs_get_tree+0x57/0x1d0 fs/super.c:1947
 fc_mount fs/namespace.c:1198 [inline]
 do_new_mount_fc fs/namespace.c:3772 [inline]
 do_new_mount+0x288/0x8d0 fs/namespace.c:3848
 path_mount+0x4ad/0xb90 fs/namespace.c:4168
 do_mount fs/namespace.c:4181 [inline]
 __do_sys_mount fs/namespace.c:4397 [inline]
 __se_sys_mount+0x28c/0x2e0 fs/namespace.c:4374
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4374
 x64_sys_call+0xc3b/0x2550 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000007 -> 0x0000000000000008

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 12186 Comm: syz.2.2136 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/04 22:28 upstream bc35965f6940 f65209a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2026/08/25 12:08 upstream 66498c75b4f8 a9a1fc32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2026/07/26 09:52 upstream 3dab139d4795 492bab15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
* Struck through repros no longer work on HEAD.