syzbot


KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

Status: moderation: reported on 2022/01/06 20:11
Reported-by: syzbot+06d291120ff02d083cb8@syzkaller.appspotmail.com
First crash: 453d, last: 4d12h

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

read-write to 0xffff88810a91a4e0 of 8 bytes by task 18939 on cpu 1:
 __filemap_add_folio+0x379/0x6e0 mm/filemap.c:900
 filemap_add_folio+0x6b/0x150 mm/filemap.c:935
 page_cache_ra_unbounded+0x1a0/0x320 mm/readahead.c:251
 do_page_cache_ra+0xa7/0xc0 mm/readahead.c:300
 ondemand_readahead+0x6c3/0x6d0 mm/readahead.c:655
 page_cache_sync_ra+0xdc/0xf0 mm/readahead.c:709
 page_cache_sync_readahead include/linux/pagemap.h:1210 [inline]
 filemap_get_pages mm/filemap.c:2600 [inline]
 filemap_read+0x3fd/0x1510 mm/filemap.c:2694
 generic_file_read_iter+0x72/0x320 mm/filemap.c:2840
 ext4_file_read_iter+0x1c8/0x280
 call_read_iter include/linux/fs.h:2183 [inline]
 generic_file_splice_read+0xde/0x2b0 fs/splice.c:309
 do_splice_to fs/splice.c:793 [inline]
 splice_direct_to_actor+0x26c/0x620 fs/splice.c:865
 do_splice_direct+0xfb/0x180 fs/splice.c:974
 do_sendfile+0x3bf/0x910 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+0x10c/0x150 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88810a91a4e0 of 8 bytes by task 18925 on cpu 0:
 mapping_needs_writeback mm/filemap.c:624 [inline]
 filemap_write_and_wait_range+0x50/0x1f0 mm/filemap.c:673
 __iomap_dio_rw+0x5dc/0x1000 fs/iomap/direct-io.c:572
 iomap_dio_rw+0x3c/0x80 fs/iomap/direct-io.c:689
 ext4_dio_write_iter fs/ext4/file.c:587 [inline]
 ext4_file_write_iter+0xa36/0x11b0 fs/ext4/file.c:698
 do_iter_write+0x494/0x750 fs/read_write.c:861
 vfs_iter_write+0x4c/0x70 fs/read_write.c:902
 iter_file_splice_write+0x44a/0x7c0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:931
 splice_direct_to_actor+0x305/0x620 fs/splice.c:886
 do_splice_direct+0xfb/0x180 fs/splice.c:974
 do_sendfile+0x3bf/0x910 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+0x10c/0x150 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000088 -> 0x000000000000008d

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 18925 Comm: syz-executor.2 Tainted: G        W          6.2.0-rc5-syzkaller-00027-gfb6e71db53f3-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
==================================================================

Crashes (381):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/01/25 04:42 upstream fb6e71db53f3 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/24 13:35 upstream 7bf70dbb1882 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/23 02:52 upstream 2475bf0250de cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/22 01:30 upstream f883675bf652 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/21 00:53 upstream edc00350d205 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/20 17:42 upstream d368967cb103 dd15ff29 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/17 20:44 upstream 6e50979a9c87 42660d9e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/14 22:46 upstream 97ec4d559d93 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/11 14:36 upstream 7dd4b804e080 96166539 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/11 11:11 upstream 40c18f363a08 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/09 23:29 upstream 1fe4fd6f5cad 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/07 19:39 upstream 0a71553536d2 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/05 06:53 upstream 512dee0c00ad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2023/01/03 08:36 upstream 69b41ac87e4a ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/30 17:09 upstream 2258c2dc850b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/28 08:28 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/24 17:44 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/19 17:52 upstream f9ff5644bcc0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/17 09:03 upstream 84e57d292203 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/15 10:51 upstream 041fae9c105a 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/11 22:03 upstream 4cee37b3a4e6 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/11 03:44 upstream 296a7b7eb792 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/09 22:31 upstream 0d1409e4ff08 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/09 02:34 upstream f3e8416619ce 1034e5fa .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/05 08:46 upstream 0ba09b173387 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/12/02 14:12 upstream a4412fdd49dc e080de16 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/29 07:03 upstream ca57f02295f1 ca9683b8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/29 02:24 upstream b7b275e60bcd ca9683b8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/28 14:14 upstream b7b275e60bcd 247de55b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/28 09:15 upstream b7b275e60bcd f4470a7b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/23 12:26 upstream eb7081409f94 52fdf57a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/22 17:14 upstream eb7081409f94 9da37ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/19 14:37 upstream ab290eaddc4c 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/18 06:01 upstream 84368d882b96 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/16 05:08 upstream 81e7cfa3a9eb 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/14 03:18 upstream af7a05689189 7ba4d859 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/13 02:46 upstream fef7fd48922d f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/11 19:10 upstream eb037f16f7e8 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/11 05:10 upstream 4bbf3422df78 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/09 23:45 upstream f67dd6ce0723 bebca8b7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/09 15:41 upstream f141df371335 bebca8b7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/11/08 17:35 upstream 59f2f4b8a757 060f945e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2022/01/06 17:04 upstream 75acfdb6fd92 6acc789a .config console log report info KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
ci2-upstream-kcsan-gce 2021/11/01 23:42 upstream e66435936756 098b5d53 .config console log report info KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range
* Struck through repros no longer work on HEAD.