syzbot


KCSAN: data-race in __add_to_page_cache_locked / iterate_bdevs

Status: auto-closed as invalid on 2021/10/22 05:09
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 442d, last: 442d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __add_to_page_cache_locked / iterate_bdevs

write to 0xffff8881004055a8 of 8 bytes by task 7456 on cpu 0:
 __add_to_page_cache_locked+0x276/0x4f0 mm/filemap.c:931
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:984
 page_cache_ra_unbounded+0x274/0x430 mm/readahead.c:222
 do_page_cache_ra mm/readahead.c:269 [inline]
 force_page_cache_ra+0x256/0x290 mm/readahead.c:301
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:575
 page_cache_sync_readahead include/linux/pagemap.h:883 [inline]
 filemap_get_pages mm/filemap.c:2545 [inline]
 filemap_read+0x3dd/0x1240 mm/filemap.c:2628
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 blkdev_read_iter+0xe1/0x140 block/fops.c:544
 call_read_iter include/linux/fs.h:2157 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0x672/0x750 fs/read_write.c:485
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881004055a8 of 8 bytes by task 7482 on cpu 1:
 iterate_bdevs+0x10c/0x2d0 block/bdev.c:1030
 ksys_sync+0x93/0xe0 fs/sync.c:118
 __do_sys_sync+0xa/0x10 fs/sync.c:125
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000001 -> 0x0000000000000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7482 Comm: syz-executor.2 Not tainted 5.15.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/09/17 05:03 upstream bdb575f87217 5b989942 .config log report info KCSAN: data-race in __add_to_page_cache_locked / iterate_bdevs
* Struck through repros no longer work on HEAD.