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: 1071d, last: 1d12h

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

write to 0xffff88811816f85c of 4 bytes by task 2337 on cpu 0:
 xa_mark_set lib/xarray.c:69 [inline]
 xas_set_mark+0x11e/0x130 lib/xarray.c:894
 __folio_start_writeback+0x2bf/0x5d0 mm/page-writeback.c:2978
 set_page_writeback+0x3d/0xe0 mm/folio-compat.c:56
 __block_write_full_page+0x4f7/0xb10 fs/buffer.c:1802
 block_write_full_page+0xda/0x100
 __mpage_writepage+0xb00/0xda0 fs/mpage.c:629
 write_cache_pages+0x443/0xa30 mm/page-writeback.c:2359
 mpage_writepages+0x6e/0xe0 fs/mpage.c:664
 fat_writepages+0x20/0x30 fs/fat/inode.c:205
 do_writepages+0x1db/0x350 mm/page-writeback.c:2468
 filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
 __filemap_fdatawrite_range mm/filemap.c:421 [inline]
 file_write_and_wait_range+0xd6/0x170 mm/filemap.c:773
 __generic_file_fsync+0x48/0x140 fs/libfs.c:1115
 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:2869 [inline]
 generic_file_write_iter+0x18d/0x1c0 mm/filemap.c:3902
 do_iter_write+0x494/0x750 fs/read_write.c:855
 vfs_iter_write+0x4c/0x70 fs/read_write.c:896
 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:1249
 __do_sys_sendfile64 fs/read_write.c:1311 [inline]
 __se_sys_sendfile64 fs/read_write.c:1303 [inline]
 __x64_sys_sendfile64+0xb9/0x150 fs/read_write.c:1303
 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 0xffff88811816f85c of 4 bytes by task 2347 on cpu 1:
 xa_marked include/linux/xarray.h:420 [inline]
 xas_find_marked+0x652/0x6a0 lib/xarray.c:1329
 find_get_entry mm/filemap.c:2010 [inline]
 find_get_pages_range_tag+0x103/0x4f0 mm/filemap.c:2284
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1062
 __filemap_fdatawait_range+0xba/0x260 mm/filemap.c:516
 filemap_fdatawait_range+0x21/0xd0 mm/filemap.c:551
 filemap_fdatawait include/linux/pagemap.h:43 [inline]
 __writeback_single_inode+0xe2/0x590 fs/fs-writeback.c:1597
 writeback_single_inode+0x126/0x4f0 fs/fs-writeback.c:1708
 sync_inode_metadata+0x52/0x70 fs/fs-writeback.c:2743
 __generic_file_fsync+0xf5/0x140 fs/libfs.c:1126
 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:2869 [inline]
 generic_file_write_iter+0x18d/0x1c0 mm/filemap.c:3902
 do_iter_write+0x494/0x750 fs/read_write.c:855
 vfs_iter_write+0x4c/0x70 fs/read_write.c:896
 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:1249
 __do_sys_sendfile64 fs/read_write.c:1317 [inline]
 __se_sys_sendfile64 fs/read_write.c:1303 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1303
 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: 0x28000021 -> 0x00000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2347 Comm: syz-executor.5 Not tainted 6.0.0-rc7-syzkaller-00029-g3800a713b607-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
==================================================================

Crashes (986):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/09/27 03:29 upstream 3800a713b607 d59ba983 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/26 16:54 upstream f76349cf4145 d59ba983 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/25 05:43 upstream 1a61b828566f 0042f2b4 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/23 12:28 upstream dc164f4fb00a 0042f2b4 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/20 16:33 upstream 521a547ced64 c4b8ccfd .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/17 13:42 upstream a335366bad13 dd9a85ff .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/10 00:29 upstream ce888220d5c7 356d8217 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/03 05:15 upstream d895ec7938c4 49e94a20 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/09/02 16:32 upstream 42e66b1cc3a0 25194605 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/25 02:15 upstream c40e8341e3b3 514514f6 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/23 13:19 upstream 072e51356cd5 cea8b0f7 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/21 09:59 upstream 15b3f48a4339 26a13b38 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/19 10:43 upstream 4c2d0b039c5c 26a13b38 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/18 21:16 upstream 573ae4f13f63 26a13b38 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/12 02:40 upstream 2ae08b36c06e 21724cb2 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/10 10:40 upstream d4252071b97d aaa9eaa0 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/09 05:44 upstream 3466f49dd0dd da700653 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/06 15:00 upstream 6614a3c3164a 88e3a122 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/06 03:20 upstream 9e2f40233670 e853abd9 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/05 10:47 upstream c040862bfbd9 a65a7ce9 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/08/04 16:14 upstream b44f2fd87919 1c9013ac .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/31 22:25 upstream 334c0ef6429f fef302b1 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/28 12:43 upstream 6e7765cb477a fb95c74d .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/26 18:19 upstream 5de64d44968e 279b89c2 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/26 07:24 upstream e0dccc3b76fb 34795c51 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/23 23:06 upstream 515f71412bb7 22343af4 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/21 01:39 upstream 353f7988dd84 88cb1383 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/19 11:05 upstream ca85855bdcae 72a3cc0c .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/17 22:21 upstream ff6992735ade 95cb00d1 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/14 01:56 upstream 4a57a8400075 5d921b08 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/13 17:27 upstream b047602d579b 5d921b08 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/08 21:03 upstream a471da3100ef b5765a15 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/07/06 02:16 upstream e35e5b6f695d bff65f44 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/29 13:55 upstream 941e3e791269 1434eec0 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/28 08:21 upstream 941e3e791269 ef82eb2c .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/26 20:27 upstream 82708bb1eb9e a371c43c .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/25 15:16 upstream 8c23f235a6a8 a371c43c .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/24 12:04 upstream 92f20ff72066 a371c43c .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/23 23:05 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/18 09:36 upstream 4b35035bcf80 8f633d84 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/13 04:16 upstream 997952851843 0d5abf15 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/12 03:35 upstream 7a68065eb9cd 0d5abf15 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/05 03:05 upstream d0e60d46bc03 c8857892 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/06/01 00:47 upstream e1cbc3b96a99 3666edfe .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/05/30 08:25 upstream b00ed48bb0a7 a46af346 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/05/25 15:38 upstream fdaf9a5840ac 3037caa9 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2022/05/22 06:54 upstream eaea45fc0e7b 7268fa62 .config log report info KCSAN: data-race in xas_find_marked / xas_set_mark
ci2-upstream-kcsan-gce 2021/01/16 09:14 upstream 1d94330a437a 65a7a854 .config log report info
ci2-upstream-kcsan-gce 2019/10/23 02:27 https://github.com/google/ktsan.git kcsan 05f2236801fe d0686497 .config log report
* Struck through repros no longer work on HEAD.