syzbot


KCSAN: data-race in __filemap_add_folio / generic_file_direct_write (5)

Status: auto-obsoleted due to no activity on 2023/05/04 15:57
Subsystems: fs mm
[Documentation on labels]
First crash: 406d, last: 406d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_add_folio / generic_file_direct_write (3) fs mm 3 733d 738d 0/26 auto-closed as invalid on 2022/06/12 06:31
upstream KCSAN: data-race in __filemap_add_folio / generic_file_direct_write fs mm 1 912d 912d 0/26 auto-closed as invalid on 2021/12/15 10:13
upstream KCSAN: data-race in __filemap_add_folio / generic_file_direct_write (6) fs mm 1 370d 370d 0/26 auto-obsoleted due to no activity on 2023/06/09 18:37
upstream KCSAN: data-race in __filemap_add_folio / generic_file_direct_write (2) fs mm 1 792d 792d 0/26 auto-closed as invalid on 2022/04/14 05:12
upstream KCSAN: data-race in __filemap_add_folio / generic_file_direct_write (4) mm fs 1 654d 654d 0/26 auto-closed as invalid on 2022/08/29 21:55

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / generic_file_direct_write

read-write to 0xffff888159de1e90 of 8 bytes by task 11244 on cpu 1:
 __filemap_add_folio+0x38c/0x720 mm/filemap.c:904
 filemap_add_folio+0x6f/0x150 mm/filemap.c:939
 page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:251
 do_page_cache_ra mm/readahead.c:300 [inline]
 page_cache_ra_order mm/readahead.c:560 [inline]
 ondemand_readahead+0x550/0x6c0 mm/readahead.c:682
 page_cache_sync_ra+0x284/0x2a0 mm/readahead.c:709
 page_cache_sync_readahead include/linux/pagemap.h:1214 [inline]
 filemap_get_pages+0x257/0xea0 mm/filemap.c:2598
 filemap_read+0x223/0x680 mm/filemap.c:2693
 generic_file_read_iter+0x76/0x320 mm/filemap.c:2840
 call_read_iter include/linux/fs.h:1845 [inline]
 generic_file_splice_read+0xe3/0x290 fs/splice.c:402
 do_splice_to fs/splice.c:885 [inline]
 splice_direct_to_actor+0x25a/0x5f0 fs/splice.c:956
 do_splice_direct+0x104/0x180 fs/splice.c:1065
 do_sendfile+0x3b8/0x950 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64 fs/read_write.c:1309 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888159de1e90 of 8 bytes by task 11243 on cpu 0:
 generic_file_direct_write+0x289/0x400 mm/filemap.c:3869
 __generic_file_write_iter+0x122/0x290 mm/filemap.c:4010
 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4086
 do_iter_write+0x418/0x700 fs/read_write.c:861
 vfs_iter_write+0x50/0x70 fs/read_write.c:902
 iter_file_splice_write+0x456/0x7d0 fs/splice.c:778
 do_splice_from fs/splice.c:856 [inline]
 direct_splice_actor+0x84/0xa0 fs/splice.c:1022
 splice_direct_to_actor+0x2ee/0x5f0 fs/splice.c:977
 do_splice_direct+0x104/0x180 fs/splice.c:1065
 do_sendfile+0x3b8/0x950 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64 fs/read_write.c:1309 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000035 -> 0x0000000000000036

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11243 Comm: syz-executor.3 Not tainted 6.3.0-rc4-syzkaller-00039-gffe78bbd5121 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
==================================================================
syz-executor.3: attempt to access beyond end of device
loop3: rw=2049, sector=2048, nr_sectors = 4 limit=2048

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/30 15:53 upstream ffe78bbd5121 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / generic_file_direct_write
* Struck through repros no longer work on HEAD.