syzbot


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

Status: moderation: reported on 2025/06/25 03:26
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+51340a329fdcf1a5967c@syzkaller.appspotmail.com
First crash: 8h31m, last: 8h31m
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev fs mm 3 1098d 1133d 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 4 675d 705d 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 4 540d 561d 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 1 800d 793d 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) fs mm 2 1001d 1028d 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 2 102d 107d 0/29 auto-obsoleted due to no activity on 2025/05/09 19:21
upstream KCSAN: data-race in __filemap_add_folio / invalidate_bdev (6) fs mm 1 458d 458d 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 1 210d 210d 0/29 auto-obsoleted due to no activity on 2025/01/22 09:36

Sample crash report:
netlink: 44 bytes leftover after parsing attributes in process `syz.6.13394'.
loop6: detected capacity change from 0 to 512
EXT4-fs: Ignoring removed bh option
EXT4-fs: Mount option(s) incompatible with ext3
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / invalidate_bdev

read-write to 0xffff88811c84ca30 of 8 bytes by task 23859 on cpu 0:
 __filemap_add_folio+0x5b9/0x7d0 mm/filemap.c:928
 filemap_add_folio+0x98/0x1b0 mm/filemap.c:969
 page_cache_ra_unbounded+0x1f3/0x380 mm/readahead.c:275
 do_page_cache_ra mm/readahead.c:327 [inline]
 force_page_cache_ra mm/readahead.c:356 [inline]
 page_cache_sync_ra+0x256/0x6a0 mm/readahead.c:575
 filemap_get_pages+0x2d0/0x1150 mm/filemap.c:2602
 filemap_read+0x231/0xa00 mm/filemap.c:2711
 blkdev_read_iter+0x22d/0x2e0 block/fops.c:833
 new_sync_read fs/read_write.c:491 [inline]
 vfs_read+0x5cd/0x6f0 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+0x2d77/0x2fb0 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 0xffff88811c84ca30 of 8 bytes by task 9973 on cpu 1:
 invalidate_bdev+0x25/0x70 block/bdev.c:99
 __ext4_fill_super fs/ext4/super.c:5699 [inline]
 ext4_fill_super+0x2a6e/0x34e0 fs/ext4/super.c:5724
 get_tree_bdev_flags+0x291/0x300 fs/super.c:1681
 get_tree_bdev+0x1f/0x30 fs/super.c:1704
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5756
 vfs_get_tree+0x54/0x1d0 fs/super.c:1804
 do_new_mount+0x207/0x680 fs/namespace.c:3885
 path_mount+0x4a4/0xb20 fs/namespace.c:4209
 do_mount fs/namespace.c:4222 [inline]
 __do_sys_mount fs/namespace.c:4433 [inline]
 __se_sys_mount+0x28f/0x2e0 fs/namespace.c:4410
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4410
 x64_sys_call+0xd36/0x2fb0 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: 1 UID: 0 PID: 9973 Comm: syz.6.13394 Not tainted 6.16.0-rc3-syzkaller-00044-g7595b66ae9de #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/25 03:25 upstream 7595b66ae9de 26d77996 .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.