syzbot


KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark (2)

Status: moderation: reported on 2025/02/05 01:47
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+e9faaed5d742e1ece42a@syzkaller.appspotmail.com
First crash: 207d, last: 16h25m
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark mm fs 6 143 1248d 1525d 0/29 auto-closed as invalid on 2022/05/06 12:50

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

write to 0xffff88810b3cfb04 of 4 bytes by task 16341 on cpu 0:
 xa_mark_set lib/xarray.c:71 [inline]
 xas_set_mark+0x12b/0x140 lib/xarray.c:900
 __folio_start_writeback+0x1dd/0x440 mm/page-writeback.c:3071
 ext4_bio_write_folio+0x5ad/0x9f0 fs/ext4/page-io.c:583
 mpage_submit_folio fs/ext4/inode.c:2080 [inline]
 mpage_process_page_bufs+0x4a1/0x620 fs/ext4/inode.c:2191
 mpage_prepare_extent_to_map+0x786/0xc00 fs/ext4/inode.c:2736
 ext4_do_writepages+0xa05/0x2750 fs/ext4/inode.c:2929
 ext4_writepages+0x176/0x300 fs/ext4/inode.c:3025
 do_writepages+0x1c3/0x310 mm/page-writeback.c:2634
 filemap_fdatawrite_wbc mm/filemap.c:386 [inline]
 __filemap_fdatawrite_range mm/filemap.c:419 [inline]
 file_write_and_wait_range+0x156/0x2c0 mm/filemap.c:794
 generic_buffers_fsync_noflush+0x45/0x120 fs/buffer.c:609
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x1ab/0x690 fs/ext4/fsync.c:147
 vfs_fsync_range+0x10d/0x130 fs/sync.c:187
 generic_write_sync include/linux/fs.h:3042 [inline]
 ext4_buffered_write_iter+0x34f/0x3c0 fs/ext4/file.c:305
 ext4_dio_write_iter fs/ext4/file.c:613 [inline]
 ext4_file_write_iter+0xdbf/0xf00 fs/ext4/file.c:721
 iter_file_splice_write+0x663/0xa60 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x153/0x2a0 fs/splice.c:1161
 splice_direct_to_actor+0x30f/0x680 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0xda/0x150 fs/splice.c:1230
 do_sendfile+0x380/0x650 fs/read_write.c:1370
 __do_sys_sendfile64 fs/read_write.c:1431 [inline]
 __se_sys_sendfile64 fs/read_write.c:1417 [inline]
 __x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1417
 x64_sys_call+0x2bb0/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810b3cfb04 of 4 bytes by task 16337 on cpu 1:
 xa_marked include/linux/xarray.h:424 [inline]
 mapping_tagged include/linux/fs.h:542 [inline]
 filemap_fdatawrite_wbc mm/filemap.c:382 [inline]
 __filemap_fdatawrite_range mm/filemap.c:419 [inline]
 filemap_write_and_wait_range+0xfc/0x340 mm/filemap.c:691
 filemap_invalidate_pages+0xa4/0x1a0 mm/filemap.c:2816
 kiocb_invalidate_pages+0x6e/0x80 mm/filemap.c:2835
 __iomap_dio_rw+0x5d4/0x1250 fs/iomap/direct-io.c:698
 iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:818
 ext4_dio_write_iter fs/ext4/file.c:580 [inline]
 ext4_file_write_iter+0xad9/0xf00 fs/ext4/file.c:721
 iter_file_splice_write+0x663/0xa60 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x153/0x2a0 fs/splice.c:1161
 splice_direct_to_actor+0x30f/0x680 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0xda/0x150 fs/splice.c:1230
 do_sendfile+0x380/0x650 fs/read_write.c:1370
 __do_sys_sendfile64 fs/read_write.c:1431 [inline]
 __se_sys_sendfile64 fs/read_write.c:1417 [inline]
 __x64_sys_sendfile64+0x105/0x150 fs/read_write.c:1417
 x64_sys_call+0x2bb0/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0a000021 -> 0x04000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 16337 Comm: syz.5.4134 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (168):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/31 03:37 upstream c8bc81a52d5a 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/30 16:12 upstream 11e7861d680c 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/30 06:34 upstream fb679c832b64 807a3b61 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/29 17:45 upstream fb679c832b64 3e1beec6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/29 11:22 upstream 07d9df80082b 3e1beec6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/29 02:06 upstream 07d9df80082b d401b9d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/28 19:13 upstream 07d9df80082b e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/26 16:56 upstream fab1beda7597 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/26 09:51 upstream fab1beda7597 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/25 16:41 upstream b6add54ba618 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/24 16:46 upstream 69fd6b99b8f8 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/23 21:10 upstream 8d245acc1e88 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/23 09:54 upstream 6debb6904172 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/23 00:49 upstream cf6fc5eefc5b bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/22 15:19 upstream 3957a5720157 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/20 22:56 upstream 41cd3fd15263 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/20 15:45 upstream b19a97d57c15 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/20 02:27 upstream b19a97d57c15 79512909 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/19 22:25 upstream b19a97d57c15 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/18 03:57 upstream 8d561baae505 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/16 06:46 upstream dfd4b508c8c6 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/15 19:23 upstream ee94b00c1a64 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/14 14:00 upstream 0cc53520e68b 5d8c2ac2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/14 11:35 upstream 0cc53520e68b 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/13 23:06 upstream dfc0f6373094 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/13 13:13 upstream 8742b2d8935f 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/12 19:15 upstream 0e39a731820a 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/12 08:51 upstream 53e760d89498 c06e8995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/12 01:27 upstream 8f5ae30d69d7 c06e8995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/10 23:18 upstream 8f5ae30d69d7 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/10 09:58 upstream 2b38afce25c4 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/10 07:58 upstream 561c80369df0 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/08 20:09 upstream 37816488247d 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/07 12:11 upstream 6e64f4580381 04cffc22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/07 00:45 upstream cca7a0aae895 9a42d6b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/06 14:40 upstream 479058002c32 ffe1dd46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/05 21:54 upstream 7e161a991ea7 37880f40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/05 08:58 upstream 7e161a991ea7 f5bcc8dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/04 23:46 upstream d632ab86aff2 f5bcc8dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/04 07:27 upstream 352af6a011d5 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/04 07:20 upstream 352af6a011d5 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/03 04:14 upstream 186f3edfdd41 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/03 00:20 upstream a6923c06a3b2 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/02 02:00 upstream 0905809b38bd 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/01 23:17 upstream f2d282e1dfb3 40127d41 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/08/01 06:11 upstream f2d282e1dfb3 0c075d67 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
2025/02/05 01:46 upstream d009de7d5428 5896748e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_write_and_wait_range / xas_set_mark
* Struck through repros no longer work on HEAD.