syzbot


KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

Status: moderation: reported on 2022/01/06 20:11
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+06d291120ff02d083cb8@syzkaller.appspotmail.com
First crash: 849d, last: 1d00h

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

read-write to 0xffff888106dcde58 of 8 bytes by task 7994 on cpu 0:
 __filemap_add_folio+0x4c1/0x730 mm/filemap.c:903
 filemap_add_folio+0x70/0x160 mm/filemap.c:938
 page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:250
 do_page_cache_ra mm/readahead.c:299 [inline]
 page_cache_ra_order mm/readahead.c:544 [inline]
 ondemand_readahead+0x50b/0x670 mm/readahead.c:666
 page_cache_sync_ra+0x27e/0x2a0 mm/readahead.c:693
 page_cache_sync_readahead include/linux/pagemap.h:1300 [inline]
 filemap_get_pages+0x251/0xf90 mm/filemap.c:2498
 filemap_splice_read+0x337/0x8f0 mm/filemap.c:2872
 ext4_file_splice_read+0x95/0xb0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x268/0x660 fs/splice.c:1089
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3b9/0x960 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888106dcde58 of 8 bytes by task 7983 on cpu 1:
 mapping_needs_writeback mm/filemap.c:626 [inline]
 filemap_write_and_wait_range+0x51/0x210 mm/filemap.c:675
 kiocb_invalidate_pages+0x87/0x1e0 mm/filemap.c:2705
 __iomap_dio_rw+0x5ad/0x1090 fs/iomap/direct-io.c:638
 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
 ext4_dio_write_iter fs/ext4/file.c:577 [inline]
 ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:696
 call_write_iter include/linux/fs.h:2087 [inline]
 iter_file_splice_write+0x5de/0x950 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x2fb/0x660 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3b9/0x960 fs/read_write.c:1295
 __do_sys_sendfile64 fs/read_write.c:1362 [inline]
 __se_sys_sendfile64 fs/read_write.c:1348 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000000249 -> 0x000000000000024e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7983 Comm: syz-executor.4 Not tainted 6.8.0-rc6-syzkaller-00021-gcf1182944c7c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (687):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/28 12:56 upstream cf1182944c7c 55d6f11d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/23 02:17 upstream 1c892cdd8fe0 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/19 17:28 upstream b401b621758e 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/18 23:42 upstream b401b621758e 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/16 20:29 upstream 0f1dd5e91e2b 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/16 06:40 upstream 4f5e5092fdbf 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/15 17:15 upstream 8d3dea210042 fd39cf6f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/15 01:24 upstream 8d3dea210042 d9b1cdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/14 08:21 upstream 7e90b5c295ec d902085f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/13 13:37 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/10 09:38 upstream 4a7bbe7519b6 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/09 17:29 upstream 1f719a2f3fa6 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/08 12:35 upstream 047371968ffc 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/07 22:35 upstream 547ab8fc4cb0 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/06 07:11 upstream 54be6c6c5ae8 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/04 06:37 upstream b555d191561a a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/03 05:46 upstream 56897d51886f 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/03 03:25 upstream 021533194476 60bf9982 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/02 14:39 upstream 021533194476 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/02/02 06:45 upstream 5c24e4e9e708 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/29 02:40 upstream 4854cf9c61d0 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/28 07:27 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/27 00:11 upstream 3a5879d495b2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/26 10:26 upstream ecb1b8288dc7 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/24 04:44 upstream 7ed2632ec7d7 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/23 05:21 upstream 5d9248eed480 1c0ecc51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/23 00:53 upstream 5d9248eed480 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/22 10:21 upstream 6613476e225e 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/21 08:08 upstream 7a396820222d 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/21 00:19 upstream 125514880ddd 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/20 06:39 upstream 9d64bf433c53 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/19 14:21 upstream 9d1694dc91ce 21772ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/18 20:56 upstream 296455ade1fd 239abf84 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/18 06:14 upstream 1b1934dbbdcf 915053c7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/15 20:33 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/13 05:51 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/12 19:21 upstream 70d201a40823 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/12 14:49 upstream 70d201a40823 f6fa7c28 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/12 11:09 upstream 70d201a40823 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/11 21:29 upstream 3e7aeb78ab01 dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/10 18:50 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/10 03:28 upstream 35f11a3710cd b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/08 22:58 upstream 5db8752c3b81 4c0fd4bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/07 15:59 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/05 23:05 upstream a4ab2706bb12 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2024/01/05 12:07 upstream 1f874787ed9a 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2023/12/30 21:32 upstream 453f5db0619e fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2023/12/30 01:57 upstream f016f7547aee fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2022/01/06 17:04 upstream 75acfdb6fd92 6acc789a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
2021/11/01 23:42 upstream e66435936756 098b5d53 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
* Struck through repros no longer work on HEAD.