syzbot


KCSAN: data-race in xas_find_marked / xas_set_mark

Status: moderation: reported on 2019/12/05 04:45
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+238e9bb046564c2c4d4a@syzkaller.appspotmail.com
First crash: 2137d, last: 1h42m

Sample crash report:
EXT4-fs (loop2): encrypted files will use data=ordered instead of data journaling mode
EXT4-fs (loop2): 1 truncate cleaned up
EXT4-fs (loop2): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
==================================================================
BUG: KCSAN: data-race in xas_find_marked / xas_set_mark

write to 0xffff88811a5d29a4 of 4 bytes by task 11915 on cpu 1:
 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]
 filemap_write_and_wait_range+0x144/0x340 mm/filemap.c:691
 ext4_dio_write_iter fs/ext4/file.c:626 [inline]
 ext4_file_write_iter+0xe04/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 0xffff88811a5d29a4 of 4 bytes by task 11913 on cpu 0:
 xa_marked include/linux/xarray.h:424 [inline]
 xas_find_marked+0x5dc/0x620 lib/xarray.c:1483
 find_get_entry+0x5d/0x380 mm/filemap.c:2039
 filemap_get_folios_tag+0x92/0x210 mm/filemap.c:2307
 mpage_prepare_extent_to_map+0x320/0xc00 fs/ext4/inode.c:2637
 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

value changed: 0x0a000021 -> 0x04000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 11913 Comm: syz.2.2657 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================
==================================================================
BUG: KCSAN: data-race in __filemap_add_folio / filemap_write_and_wait_range

read-write to 0xffff88811a5d29f0 of 8 bytes by task 11915 on cpu 1:
 __filemap_add_folio+0x5b9/0x7d0 mm/filemap.c:928
 filemap_add_folio+0x98/0x1b0 mm/filemap.c:969
 __filemap_get_folio+0x31e/0x6b0 mm/filemap.c:1991
 write_begin_get_folio include/linux/pagemap.h:776 [inline]
 ext4_write_begin+0x2fe/0xeb0 fs/ext4/inode.c:1318
 generic_perform_write+0x184/0x490 mm/filemap.c:4175
 ext4_buffered_write_iter+0x1ee/0x3c0 fs/ext4/file.c:299
 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 0xffff88811a5d29f0 of 8 bytes by task 11913 on cpu 0:
 mapping_needs_writeback mm/filemap.c:641 [inline]
 filemap_write_and_wait_range+0x59/0x340 mm/filemap.c:690
 ext4_dio_write_iter fs/ext4/file.c:626 [inline]
 ext4_file_write_iter+0xe04/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: 0x0000000000000000 -> 0x0000000000000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 11913 Comm: syz.2.2657 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================
syz.2.2657 (11913) used greatest stack depth: 9080 bytes left

Crashes (2160):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/29 11:23 upstream 07d9df80082b 3e1beec6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/27 19:44 upstream 39f90c196721 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/26 17:13 upstream fab1beda7597 e12e5ba4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/26 06:05 upstream fab1beda7597 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/26 02:21 upstream b6add54ba618 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / 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 xas_find_marked / xas_set_mark
2025/08/23 21:14 upstream 8d245acc1e88 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/23 08:21 upstream 6debb6904172 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/22 22:09 upstream cf6fc5eefc5b bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/22 15:13 upstream 3957a5720157 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/21 14:21 upstream 068a56e56fa8 3e79b825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/21 11:45 upstream 068a56e56fa8 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/20 23:01 upstream 41cd3fd15263 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/20 17:32 upstream b19a97d57c15 0b9605c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/20 02:52 upstream b19a97d57c15 79512909 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/19 22:13 upstream b19a97d57c15 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/19 22:13 upstream b19a97d57c15 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/19 14:01 upstream be48bcf004f9 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/19 02:15 upstream be48bcf004f9 523f460e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/18 13:48 upstream c17b750b3ad9 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/17 23:17 upstream 8d561baae505 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/17 15:51 upstream 99bade344cfa 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/16 19:59 upstream 90d970cade8e 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/16 11:02 upstream dfd4b508c8c6 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / 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 xas_find_marked / xas_set_mark
2025/08/15 03:59 upstream 24ea63ea3877 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/14 16:11 upstream 0cc53520e68b 5d8c2ac2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/14 11:04 upstream 0cc53520e68b 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/13 21:55 upstream dfc0f6373094 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/13 08:18 upstream 8742b2d8935f 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/12 18:59 upstream 0e39a731820a 22ec1469 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/12 05:50 upstream 53e760d89498 c06e8995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/12 01:23 upstream 8f5ae30d69d7 c06e8995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/11 01:57 upstream 8f5ae30d69d7 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/10 20:15 upstream 2b38afce25c4 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/09 21:30 upstream 561c80369df0 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/09 07:20 upstream 2988dfed8a5d 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/08 16:10 upstream 37816488247d 32a0e5ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/08 05:21 upstream bec077162bd0 6a893178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/08 03:19 upstream 6e64f4580381 6a893178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/07 12:09 upstream 6e64f4580381 04cffc22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/07 00:36 upstream cca7a0aae895 9a42d6b1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/06 14:39 upstream 479058002c32 ffe1dd46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/06 06:13 upstream 6bcdbd62bd56 ffe1dd46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/05 16:31 upstream 7e161a991ea7 37880f40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / 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 xas_find_marked / xas_set_mark
2025/08/04 12:39 upstream d2eedaa3909b 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/03 23:19 upstream 352af6a011d5 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/03 04:13 upstream 186f3edfdd41 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2025/08/02 20:21 upstream a6923c06a3b2 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2021/01/16 09:14 upstream 1d94330a437a 65a7a854 .config console log report info ci2-upstream-kcsan-gce
2019/10/23 02:27 https://github.com/google/ktsan.git kcsan 05f2236801fe d0686497 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.