syzbot


KCSAN: data-race in xas_find_marked / xas_set_mark

Status: moderation: reported on 2019/12/05 04:45
Reported-by: syzbot+238e9bb046564c2c4d4a@syzkaller.appspotmail.com
First crash: 1198d, last: 1d04h

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

read-write to 0xffff88810ae91478 of 8 bytes by task 9880 on cpu 0:
 instrument_read_write include/linux/instrumented.h:58 [inline]
 __instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:84 [inline]
 ___test_and_set_bit include/asm-generic/bitops/instrumented-non-atomic.h:99 [inline]
 node_set_mark lib/xarray.c:93 [inline]
 xas_set_mark+0x7f/0x130 lib/xarray.c:887
 tag_pages_for_writeback+0x9d/0x290 mm/page-writeback.c:2350
 write_cache_pages+0x18c/0xa30 mm/page-writeback.c:2420
 mpage_writepages+0x6e/0xe0 fs/mpage.c:664
 fat_writepages+0x20/0x30 fs/fat/inode.c:200
 do_writepages+0x1db/0x350 mm/page-writeback.c:2581
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xf2/0x190 mm/filemap.c:777
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1132
 fat_file_fsync+0x48/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2885 [inline]
 generic_file_write_iter+0x18d/0x1c0 mm/filemap.c:3936
 do_iter_write+0x494/0x750 fs/read_write.c:861
 vfs_iter_write+0x4c/0x70 fs/read_write.c:902
 iter_file_splice_write+0x44a/0x7c0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:931
 splice_direct_to_actor+0x305/0x620 fs/splice.c:886
 do_splice_direct+0xfb/0x180 fs/splice.c:974
 do_sendfile+0x3bf/0x910 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64 fs/read_write.c:1309 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88810ae91478 of 8 bytes by task 9887 on cpu 1:
 xas_find_chunk include/linux/xarray.h:1704 [inline]
 xas_find_marked+0x22f/0x6a0 lib/xarray.c:1356
 find_get_entry mm/filemap.c:2006 [inline]
 find_get_pages_range_tag+0x102/0x420 mm/filemap.c:2311
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1126
 write_cache_pages+0x1fe/0xa30 mm/page-writeback.c:2429
 mpage_writepages+0x6e/0xe0 fs/mpage.c:664
 fat_writepages+0x20/0x30 fs/fat/inode.c:200
 do_writepages+0x1db/0x350 mm/page-writeback.c:2581
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xf2/0x190 mm/filemap.c:777
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1132
 fat_file_fsync+0x48/0x100 fs/fat/file.c:191
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2885 [inline]
 generic_file_write_iter+0x18d/0x1c0 mm/filemap.c:3936
 do_iter_write+0x494/0x750 fs/read_write.c:861
 vfs_iter_write+0x4c/0x70 fs/read_write.c:902
 iter_file_splice_write+0x44a/0x7c0 fs/splice.c:686
 do_splice_from fs/splice.c:764 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:931
 splice_direct_to_actor+0x305/0x620 fs/splice.c:886
 do_splice_direct+0xfb/0x180 fs/splice.c:974
 do_sendfile+0x3bf/0x910 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64 fs/read_write.c:1309 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1309
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000c00000 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9887 Comm: syz-executor.2 Not tainted 6.2.0-rc6-syzkaller-00011-gc0b67534c95c-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
==================================================================
syz-executor.2 (9887) used greatest stack depth: 10224 bytes left

Crashes (1061):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/02/01 10:25 upstream c0b67534c95c 9a6f477c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/31 01:11 upstream 6d796c50f84c b68fb8d6 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/28 02:41 upstream 83abd4d4c4be 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/25 14:04 upstream 948ef7bb70c4 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/25 02:17 upstream fb6e71db53f3 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/24 02:05 upstream 7bf70dbb1882 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/23 09:26 upstream 2475bf0250de 44388686 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/22 06:05 upstream 2241ab53cbb5 cc0f9968 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/19 23:06 upstream 081edded9b38 71197f3a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/18 21:30 upstream c1649ec55708 4620c2d9 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/15 09:18 upstream 7c6984405241 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/14 13:04 upstream 97ec4d559d93 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/13 14:39 upstream d9fc1511728c 529798b0 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/13 04:25 upstream c757fc92a3f7 96166539 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/11 14:13 upstream 7dd4b804e080 96166539 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/10 07:41 upstream 5a41237ad1d4 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/10 00:09 upstream 1fe4fd6f5cad 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/09 04:00 upstream 1fe4fd6f5cad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/08 09:23 upstream 9b43a525db12 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/07 12:11 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/06 00:19 upstream 41c03ba9beea 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/05 06:28 upstream 512dee0c00ad 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/04 15:29 upstream 69b41ac87e4a 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/03 10:43 upstream 69b41ac87e4a f0036e18 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/03 07:36 upstream 69b41ac87e4a ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/02 07:57 upstream 88603b6dc419 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2023/01/01 15:05 upstream e4cf7c25bae5 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/31 16:07 upstream c8451c141e07 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/30 00:35 upstream 2258c2dc850b 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/27 15:08 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/24 21:57 upstream 72a85e2b0a1e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/21 14:12 upstream b6bb9676f216 4067838e .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/20 21:31 upstream 6feb57c2fd7c d3e76707 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/20 12:03 upstream aeba12b26c79 c52b2efb .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/14 12:34 upstream e2ca6ba6ba01 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/13 20:53 upstream 764822972d64 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/13 17:20 upstream 9b93f5069fd9 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/12 19:26 upstream 830b3c68c1fb 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/11 23:28 upstream 4cee37b3a4e6 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/11 05:46 upstream 296a7b7eb792 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/10 11:32 upstream 3ecc37918c80 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/12/09 17:49 upstream 0d1409e4ff08 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 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
* Struck through repros no longer work on HEAD.