syzbot


KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range (3)

Status: moderation: reported on 2023/12/09 00:02
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+621c1f180675b25d9009@syzkaller.appspotmail.com
First crash: 416d, last: 8d16h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range (2) mm 4 459d 505d 0/26 auto-obsoleted due to no activity on 2023/01/03 00:13
upstream KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range iomap 5 726d 775d 0/26 auto-closed as invalid on 2022/04/09 14:24

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

read-write to 0xffff88810648b9b8 of 8 bytes by task 7038 on cpu 0:
 page_cache_delete mm/filemap.c:145 [inline]
 __filemap_remove_folio+0x1d1/0x2d0 mm/filemap.c:223
 __remove_mapping+0x341/0x460 mm/vmscan.c:756
 remove_mapping+0x22/0x90 mm/vmscan.c:789
 mapping_evict_folio mm/truncate.c:293 [inline]
 mapping_try_invalidate+0x27d/0x3d0 mm/truncate.c:511
 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:549
 ext4_dio_write_iter fs/ext4/file.c:619 [inline]
 ext4_file_write_iter+0xda1/0xe10 fs/ext4/file.c:696
 call_write_iter include/linux/fs.h:2085 [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

read to 0xffff88810648b9b8 of 8 bytes by task 7043 on cpu 1:
 mapping_needs_writeback mm/filemap.c:626 [inline]
 filemap_write_and_wait_range+0x51/0x210 mm/filemap.c:675
 kiocb_write_and_wait+0x79/0x110 mm/filemap.c:2689
 __iomap_dio_rw+0x4fe/0x1090 fs/iomap/direct-io.c:592
 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
 ext4_dio_read_iter fs/ext4/file.c:94 [inline]
 ext4_file_read_iter+0x21c/0x2a0 fs/ext4/file.c:145
 call_read_iter include/linux/fs.h:2079 [inline]
 copy_splice_read+0x39f/0x5d0 fs/splice.c:365
 do_splice_read fs/splice.c:984 [inline]
 splice_direct_to_actor+0x288/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

value changed: 0x0000000000000008 -> 0x0000000000000001

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

Crashes (62):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/21 09:40 upstream fca7526b7d89 3af7dd65 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2024/02/04 04:04 upstream b555d191561a a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2024/01/28 07:57 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2024/01/27 09:06 upstream 3a5879d495b2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2024/01/19 15:07 upstream 9d1694dc91ce 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2024/01/04 19:57 upstream 5eff55d725a4 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/12/11 00:54 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/12/10 17:54 upstream c527f5606aa5 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/12/09 21:15 upstream b10a3ccaf6e3 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/12/03 01:16 upstream 1b8af6552cb7 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/12/01 13:01 upstream 994d5c58e50e f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/11/28 05:41 upstream df60cee26a2e 7ec6c044 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/11/27 13:28 upstream 2cc14f52aeb7 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/11/19 18:37 upstream 037266a5f723 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/11/07 16:10 upstream be3ca57cfb77 83211397 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/11/05 06:43 upstream aea6bf908d73 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/11/01 00:51 upstream 89ed67ef126c 58499c95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/10/19 06:23 upstream dd72f9c7e512 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/10/18 01:57 upstream 06dc10eae55b 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/10/03 18:21 upstream 5e62ed3b1c8a 65faba36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/27 13:24 upstream 0e945134b680 2895a507 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/26 17:25 upstream 50768a425b46 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/23 16:09 upstream d90b0276af8f 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/20 18:17 upstream 5d2f53532ecc 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/17 12:00 upstream f0b0d403eabb 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/15 00:53 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/10 22:13 upstream 1548b060d6f3 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/07 12:24 upstream 7ba2090ca64e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/03 18:54 upstream 6e32dfcccfcc 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/09/01 00:02 upstream b97d64c72259 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/31 14:21 upstream b97d64c72259 84803932 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/25 06:18 upstream 4f9e7fabf864 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/19 21:19 upstream aa9ea98cca3a d216d8a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/18 08:10 upstream 0e8860d2125f 74b106b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/12 07:41 upstream f8de32cc060b 39990d51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/07 15:05 upstream 52a93d39b17d b1b6ae3d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/08/05 13:29 upstream 024ff300db33 4ffcc9ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/07/30 13:23 upstream d31e3792919e 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/07/28 02:40 upstream 0a8db05b571a 92476829 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/07/23 18:26 upstream c2782531397f 27cbe77f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/07/21 03:39 upstream 57f1f9dd3abe 28847498 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/07/06 03:47 upstream d528014517f2 ba5dba36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/06/28 21:51 upstream 6aeadf7896bf ca69c785 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/06/21 12:28 upstream e660abd551f1 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/06/21 05:12 upstream 99ec1ed7c2ed 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/06/15 04:14 upstream b6dad5178cea 76decb82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/05/12 17:36 upstream cc3c44c9fda2 ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/05/05 10:28 upstream 78b421b6a7c6 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/04/27 17:46 upstream 6e98b09da931 6f3d6fa7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/04/27 08:55 upstream 5c7ecada25d2 19a3dabe .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/04/24 02:45 upstream 457391b03803 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/04/18 19:49 upstream af67688dca57 d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/04/18 05:43 upstream 6a8f57ae2eb0 436577a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/04/11 04:16 upstream 0d3eb744aed4 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/03/31 06:31 upstream 8bb95a1662f8 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/03/28 23:22 upstream fcd476ea6a88 fc067f05 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/03/05 17:14 upstream b01fe98d34f3 f8902b57 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/02/22 10:55 upstream 5b7c4cabbb65 42a4d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/02/17 18:16 upstream ec35307e18ba cf8c2d39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/02/17 01:27 upstream 3ac88fa4605e 851bc19a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/02/06 00:22 upstream 4ec5183ec486 be607b78 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
2023/01/10 00:07 upstream 1fe4fd6f5cad 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range
* Struck through repros no longer work on HEAD.