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: 1856d, last: 4h48m

Sample crash report:
EXT4-fs (loop3): 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 0xffff888106e454a4 of 4 bytes by task 6842 on cpu 0:
 xa_mark_set lib/xarray.c:71 [inline]
 xas_set_mark+0x131/0x150 lib/xarray.c:893
 __folio_start_writeback+0x1f1/0x440 mm/page-writeback.c:3135
 ext4_bio_write_folio+0x591/0x9d0 fs/ext4/page-io.c:556
 mpage_submit_folio fs/ext4/inode.c:1932 [inline]
 mpage_process_page_bufs+0x486/0x5d0 fs/ext4/inode.c:2045
 mpage_prepare_extent_to_map+0x788/0xb80 fs/ext4/inode.c:2546
 ext4_do_writepages+0xa20/0x2130 fs/ext4/inode.c:2733
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2824
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2683
 filemap_fdatawrite_wbc mm/filemap.c:398 [inline]
 __filemap_fdatawrite_range mm/filemap.c:431 [inline]
 file_write_and_wait_range+0x168/0x2f0 mm/filemap.c:788
 generic_buffers_fsync_noflush+0x46/0x120 fs/buffer.c:600
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x1ff/0x6c0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x116/0x130 fs/sync.c:187
 generic_write_sync include/linux/fs.h:2904 [inline]
 ext4_buffered_write_iter+0x326/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x383/0xf20
 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x302/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+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 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 0xffff888106e454a4 of 4 bytes by task 6837 on cpu 1:
 xa_marked include/linux/xarray.h:424 [inline]
 xas_find_marked+0x60a/0x660 lib/xarray.c:1343
 find_get_entry+0x54/0x390 mm/filemap.c:1994
 filemap_get_folios_tag+0x9e/0x210 mm/filemap.c:2261
 mpage_prepare_extent_to_map+0x329/0xb80 fs/ext4/inode.c:2448
 ext4_do_writepages+0x6ea/0x2130 fs/ext4/inode.c:2688
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2824
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2683
 filemap_fdatawrite_wbc mm/filemap.c:398 [inline]
 __filemap_fdatawrite_range mm/filemap.c:431 [inline]
 file_write_and_wait_range+0x168/0x2f0 mm/filemap.c:788
 generic_buffers_fsync_noflush+0x46/0x120 fs/buffer.c:600
 ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
 ext4_sync_file+0x1ff/0x6c0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x116/0x130 fs/sync.c:187
 generic_write_sync include/linux/fs.h:2904 [inline]
 ext4_buffered_write_iter+0x326/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x383/0xf20
 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x302/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+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 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: 0x0a000021 -> 0x04000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 6837 Comm: syz.3.891 Tainted: G        W          6.12.0-syzkaller-01892-g8f7c8b88bda4 #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (1529):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/21 02:00 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/20 20:15 upstream 8f7c8b88bda4 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/20 07:11 upstream bf9aa14fc523 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/19 19:53 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/19 00:36 upstream 23acd177540d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/18 14:24 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/18 04:46 upstream adc218676eef cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/17 15:00 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/17 02:19 upstream b5a24181e461 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/16 12:15 upstream e8bdb3c8be08 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/15 22:34 upstream f868cd251776 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/15 10:15 upstream cfaaa7d010d1 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/14 12:40 upstream 0a9b9d17f3a7 a8c99394 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/13 18:21 upstream f1b785f4c787 bb3f8425 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/13 01:28 upstream 3022e9d00ebe 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/12 03:02 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/11 17:27 upstream 2d5404caa8c7 0c4b1325 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/10 04:52 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/08 21:40 upstream f1dce1f09380 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/07 17:43 upstream ff7afaeca1a1 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/06 21:46 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/06 06:07 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/06 00:50 upstream 2e1b3cc9d7f7 da38b4c9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/11/02 17:56 upstream 11066801dd4b f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/31 06:32 upstream 4236f913808c 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/30 07:23 upstream c1e939a21eb1 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/29 21:50 upstream e42b1a9a2557 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/29 10:54 upstream e42b1a9a2557 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/28 20:49 upstream 819837584309 9efb3cc7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/28 07:42 upstream 284a2f899676 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/26 13:40 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/25 03:12 upstream 4e46774408d9 c79b8ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/24 11:01 upstream c2ee9f594da8 0d144d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/23 09:52 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/22 05:53 upstream d12937763990 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/20 10:18 upstream f9e4825524aa cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/15 20:46 upstream 2f87d0916ce0 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/14 21:32 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/13 07:41 upstream 7234e2ea0edd 084d8178 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/09 15:33 upstream 75b607fab38d 56fb2cb7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/08 20:37 upstream 5b7c893ed5ed 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/08 05:07 upstream 87d6aab2389e 402f1df0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/07 10:47 upstream 8cf0b93919e1 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/06 13:09 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/05 23:48 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/05 15:41 upstream 27cc6fdf7201 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/05 00:48 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_find_marked / xas_set_mark
2024/10/03 17:46 upstream 7ec462100ef9 d7906eff .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.