syzbot


KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark

Status: moderation: reported on 2022/05/10 00:10
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+b97e9f65a69e70c39b6f@syzkaller.appspotmail.com
First crash: 976d, last: 19d

Sample crash report:
loop1: detected capacity change from 0 to 1024
EXT4-fs (loop1): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
==================================================================
BUG: KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark

write to 0xffff88810646fd24 of 4 bytes by task 4735 on cpu 1:
 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+0x58b/0x9a0 fs/ext4/page-io.c:554
 mpage_submit_folio fs/ext4/inode.c:1921 [inline]
 mpage_process_page_bufs+0x486/0x5d0 fs/ext4/inode.c:2034
 mpage_prepare_extent_to_map+0x788/0xb80 fs/ext4/inode.c:2535
 ext4_do_writepages+0xa20/0x2130 fs/ext4/inode.c:2722
 ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2813
 do_writepages+0x1d8/0x480 mm/page-writeback.c:2683
 filemap_fdatawrite_wbc+0xdb/0x100 mm/filemap.c:398
 __filemap_fdatawrite_range mm/filemap.c:431 [inline]
 file_write_and_wait_range+0xc4/0x250 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:188
 generic_write_sync include/linux/fs.h:2871 [inline]
 ext4_buffered_write_iter+0x326/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x293/0xe10
 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+0x39b/0x970 fs/read_write.c:1388
 __do_sys_sendfile64 fs/read_write.c:1455 [inline]
 __se_sys_sendfile64 fs/read_write.c:1441 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1441
 x64_sys_call+0xed5/0x2d60 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 0xffff88810646fd24 of 4 bytes by task 4733 on cpu 0:
 xa_marked include/linux/xarray.h:424 [inline]
 mapping_tagged include/linux/fs.h:502 [inline]
 filemap_fdatawrite_wbc+0x5c/0x100 mm/filemap.c:394
 __filemap_fdatawrite_range mm/filemap.c:431 [inline]
 file_write_and_wait_range+0xc4/0x250 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:188
 generic_write_sync include/linux/fs.h:2871 [inline]
 ext4_buffered_write_iter+0x326/0x370 fs/ext4/file.c:305
 ext4_file_write_iter+0x293/0xe10
 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+0x39b/0x970 fs/read_write.c:1388
 __do_sys_sendfile64 fs/read_write.c:1455 [inline]
 __se_sys_sendfile64 fs/read_write.c:1441 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1441
 x64_sys_call+0xed5/0x2d60 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: 0 UID: 0 PID: 4733 Comm: syz.1.473 Not tainted 6.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (877):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/18 14:55 upstream adc218676eef e7bb5d6e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / 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 filemap_fdatawrite_wbc / xas_set_mark
2024/11/17 15:51 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/17 03:24 upstream b5a24181e461 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/16 13:55 upstream e8bdb3c8be08 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/16 06:36 upstream f868cd251776 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/15 09:43 upstream cfaaa7d010d1 f6ede3a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/15 01:37 upstream cfaaa7d010d1 a8c99394 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/13 18:22 upstream f1b785f4c787 bb3f8425 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/12 22:17 upstream 3022e9d00ebe 62026c85 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/12 11:01 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/10 04:54 upstream de2f378f2b77 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/09 11:05 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/08 21:35 upstream f1dce1f09380 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/07 11:15 upstream ff7afaeca1a1 df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/04 20:27 upstream 557329bcecc2 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/11/01 19:49 upstream 6c52d4da1c74 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/29 21:49 upstream e42b1a9a2557 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/29 10:46 upstream e42b1a9a2557 66aeb999 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/28 08:16 upstream 284a2f899676 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/26 13:41 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/25 22:55 upstream ae90f6a6170d 045e728d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/24 11:41 upstream c2ee9f594da8 0d144d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/23 00:48 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/22 05:55 upstream d12937763990 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/21 03:39 upstream 42f7652d3eb5 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/20 10:19 upstream f9e4825524aa cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/16 00:00 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / 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 filemap_fdatawrite_wbc / xas_set_mark
2024/10/10 16:41 upstream d3d1556696c1 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/10 09:09 upstream d3d1556696c1 0278d004 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/07 21:28 upstream 87d6aab2389e d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/06 15:07 upstream 8f602276d390 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/06 09:25 upstream fc20a3e57247 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / 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 filemap_fdatawrite_wbc / xas_set_mark
2024/10/04 23:16 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/04 11:11 upstream 0c559323bbaa d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/03 18:12 upstream 7ec462100ef9 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/03 04:33 upstream f23aa4c0761a a4c7fd36 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/02 23:19 upstream f23aa4c0761a 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/02 19:48 upstream e32cde8d2bd7 02f9582a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/02 06:33 upstream e32cde8d2bd7 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/10/01 04:05 upstream e32cde8d2bd7 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/09/30 13:11 upstream 9852d85ec9d4 bbd4e0a4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/09/30 08:04 upstream 9852d85ec9d4 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/09/29 19:38 upstream e7ed34365879 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/09/29 02:04 upstream 3efc57369a0c ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2024/09/28 11:23 upstream ad46e8f95e93 ba29ff75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2022/05/09 16:32 upstream 9be9ed2612b5 8b277b8e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2022/05/08 12:25 upstream 30c8e80f7932 e60b1103 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
2022/04/06 11:04 upstream 3e732ebf7316 86b4b7f8 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark
* Struck through repros no longer work on HEAD.