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: 938d, last: 2d10h

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

read-write to 0xffff888105b99e58 of 8 bytes by task 22059 on cpu 1:
 __filemap_add_folio+0x439/0x710 mm/filemap.c:918
 filemap_add_folio+0x9c/0x1b0 mm/filemap.c:970
 page_cache_ra_unbounded+0x148/0x2e0 mm/readahead.c:252
 do_page_cache_ra mm/readahead.c:303 [inline]
 page_cache_ra_order mm/readahead.c:547 [inline]
 ondemand_readahead+0x542/0x6b0 mm/readahead.c:669
 page_cache_sync_ra+0xe0/0xf0 mm/readahead.c:696
 page_cache_sync_readahead include/linux/pagemap.h:1294 [inline]
 filemap_get_pages+0x252/0xfb0 mm/filemap.c:2529
 filemap_splice_read+0x360/0x920 mm/filemap.c:2894
 ext4_file_splice_read+0x95/0xc0 fs/ext4/file.c:158
 do_splice_read fs/splice.c:985 [inline]
 splice_direct_to_actor+0x26c/0x670 fs/splice.c:1089
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3ab/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
 x64_sys_call+0x2c9f/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888105b99e58 of 8 bytes by task 22062 on cpu 0:
 mapping_needs_writeback mm/filemap.c:635 [inline]
 filemap_write_and_wait_range+0x58/0x1f0 mm/filemap.c:684
 kiocb_invalidate_pages+0x87/0x1e0 mm/filemap.c:2727
 __iomap_dio_rw+0x585/0x1090 fs/iomap/direct-io.c:639
 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:749
 ext4_dio_write_iter fs/ext4/file.c:577 [inline]
 ext4_file_write_iter+0xaa4/0xe30 fs/ext4/file.c:696
 iter_file_splice_write+0x5e6/0x970 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x16c/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x305/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x3ab/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
 x64_sys_call+0x2c9f/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000000000000015a -> 0x0000000000000164

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 22062 Comm: syz-executor.2 Not tainted 6.9.0-syzkaller-12277-g56fb6f92854f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (719):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/25 13:29 upstream 56fb6f92854f a10a183e .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/05/25 06:36 upstream 02c438bbfffe a10a183e .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/05/24 03:32 upstream 2a8120d7b482 8f98448e .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/05/15 11:56 upstream b850dc206a57 94b087b1 .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/05/14 17:50 upstream a5131c3fdf26 fdb4c10c .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/05/10 09:42 upstream 448b3fe5a0ea de979bc2 .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/05/07 14:33 upstream dccb07f2914c cb2dcc0e .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/05/03 00:05 upstream 49a73b1652c5 ddfc15a1 .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/04/29 01:44 upstream e67572cd2204 07b455f9 .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/04/26 05:43 upstream e33c4963bf53 8bdc0f22 .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/04/25 03:27 upstream e88c4cfcb7b8 8bdc0f22 .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/04/11 11:18 upstream 9875c0beb8ad 33b9e058 .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/04/05 08:06 upstream c88b9b4cde17 0ee3535e .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/04/03 05:53 upstream b1e6ec0a0fd0 7925100d .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/04/02 19:27 upstream 026e680b0a08 eb2966c4 .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/04/01 11:34 upstream 39cd87c4eb2b 6baf5069 .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/03/30 09:23 upstream 4535e1a4174c 6baf5069 .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/03/26 14:15 upstream 928a87efa423 bcd9b39f .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/03/21 05:06 upstream dba89d1b81df 6753db5c .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/03/20 14:09 upstream a4145ce1e7bc a485f239 .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/03/18 07:12 upstream 906a93befec8 d615901c .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/03/14 14:57 upstream 480e035fc4c7 8d8ee116 .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/03/14 05:53 upstream 61387b8dcf1d f919f202 .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/03/12 21:49 upstream 855684c7d938 c35c26ec .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/03/11 06:32 upstream fa4b851b4ad6 6ee49f2e .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/03/10 08:54 upstream 005f6f34bd47 6ee49f2e .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/03/09 00:03 upstream 10d48d70e82d 8e75c913 .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/03/07 19:31 upstream 135288b73cef 2b789849 .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/03/05 09:33 upstream 90d35da658da 5fc53669 .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/03/03 23:37 upstream 58c806d867bf 25905f5d .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/03/02 13:48 upstream 17ba56605bfd 25905f5d .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/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
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.