syzbot


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

Status: moderation: reported on 2025/08/30 18:51
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+a7b8f9378c590dcdf33e@syzkaller.appspotmail.com
First crash: 50d, last: 1d20h
Similar bugs (9)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev fs mm 6 3 1215d 1250d 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 792d 822d 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 657d 678d 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 917d 910d 0/29 auto-obsoleted due to no activity on 2023/05/21 22:53
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (2) mm fs 6 2 1118d 1145d 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) mm fs 6 2 219d 224d 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) mm fs 6 1 117d 117d 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 575d 575d 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) fs mm 6 1 327d 327d 0/29 auto-obsoleted due to no activity on 2025/01/22 09:36

Sample crash report:
loop3: detected capacity change from 0 to 1024
EXT4-fs: Project quota feature not enabled. Cannot enable project quota enforcement.
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / invalidate_bdev

read-write to 0xffff888100481e78 of 8 bytes by task 3302 on cpu 1:
 __filemap_add_folio+0x5b9/0x7d0 mm/filemap.c:931
 filemap_add_folio+0x1d9/0x360 mm/filemap.c:978
 page_cache_ra_unbounded+0x203/0x450 mm/readahead.c:280
 do_page_cache_ra mm/readahead.c:332 [inline]
 force_page_cache_ra mm/readahead.c:361 [inline]
 page_cache_sync_ra+0x26e/0x6a0 mm/readahead.c:579
 filemap_get_pages+0x2d0/0x11b0 mm/filemap.c:2638
 filemap_read+0x231/0xa00 mm/filemap.c:2748
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:859
 new_sync_read fs/read_write.c:491 [inline]
 vfs_read+0x64c/0x770 fs/read_write.c:572
 ksys_read+0xda/0x1a0 fs/read_write.c:715
 __do_sys_read fs/read_write.c:724 [inline]
 __se_sys_read fs/read_write.c:722 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:722
 x64_sys_call+0x27c0/0x3000 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888100481e78 of 8 bytes by task 17997 on cpu 0:
 invalidate_bdev+0x25/0x70 block/bdev.c:99
 __ext4_fill_super fs/ext4/super.c:5711 [inline]
 ext4_fill_super+0x2d2c/0x3810 fs/ext4/super.c:5736
 get_tree_bdev_flags+0x291/0x300 fs/super.c:1691
 get_tree_bdev+0x1f/0x30 fs/super.c:1714
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5768
 vfs_get_tree+0x57/0x1d0 fs/super.c:1751
 fc_mount fs/namespace.c:1208 [inline]
 do_new_mount_fc fs/namespace.c:3651 [inline]
 do_new_mount+0x24d/0x660 fs/namespace.c:3727
 path_mount+0x4a5/0xb70 fs/namespace.c:4037
 do_mount fs/namespace.c:4050 [inline]
 __do_sys_mount fs/namespace.c:4238 [inline]
 __se_sys_mount+0x28c/0x2e0 fs/namespace.c:4215
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4215
 x64_sys_call+0x2b51/0x3000 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000000000000001 -> 0x0000000000000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 17997 Comm: syz.3.4755 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/18 16:20 upstream f406055cb18c 1c8c8cd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2025/09/09 00:26 upstream f777d1112ee5 d291dd2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / invalidate_bdev
2025/08/30 18:50 upstream 11e7861d680c 807a3b61 .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.