syzbot


KCSAN: data-race in __xa_set_mark / xas_find_marked

Status: moderation: reported on 2020/09/25 08:57
Reported-by: syzbot+f512479ce46e8f0a9370@syzkaller.appspotmail.com
First crash: 834d, last: 6h16m

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

read-write to 0xffff88814a588228 of 8 bytes by task 7327 on cpu 1:
 instrument_read_write include/linux/instrumented.h:57 [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 lib/xarray.c:887 [inline]
 __xa_set_mark+0xe0/0x1a0 lib/xarray.c:1906
 __folio_mark_dirty+0xfb/0x130 mm/page-writeback.c:2616
 __set_page_dirty include/linux/pagemap.h:1057 [inline]
 mark_buffer_dirty+0x152/0x390 fs/buffer.c:1105
 __block_commit_write+0x11d/0x1c0 fs/buffer.c:2080
 block_write_end fs/buffer.c:2159 [inline]
 generic_write_end+0x81/0x350 fs/buffer.c:2173
 ext4_da_write_end+0x26c/0x620 fs/ext4/inode.c:3089
 generic_perform_write+0x264/0x3f0 mm/filemap.c:3749
 ext4_buffered_write_iter+0x235/0x3e0 fs/ext4/file.c:270
 ext4_file_write_iter+0x2e3/0x1210
 call_write_iter include/linux/fs.h:2187 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x468/0x760 fs/read_write.c:584
 ksys_write+0xe8/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:646
 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 0xffff88814a588228 of 8 bytes by task 7332 on cpu 0:
 xas_find_chunk include/linux/xarray.h:1704 [inline]
 xas_find_marked+0x22f/0x6a0 lib/xarray.c:1356
 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
 mpage_prepare_extent_to_map+0x1a4/0xa50 fs/ext4/inode.c:2588
 ext4_writepages+0x9b8/0x1cf0 fs/ext4/inode.c:2825
 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]
 __filemap_fdatawrite mm/filemap.c:427 [inline]
 filemap_flush+0x93/0xc0 mm/filemap.c:454
 ext4_alloc_da_blocks+0x47/0x100 fs/ext4/inode.c:3133
 __ext4_ioctl fs/ext4/ioctl.c:1403 [inline]
 ext4_ioctl+0xf5e/0x2bf0 fs/ext4/ioctl.c:1606
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xcb/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 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: 0x000fffffffffffff -> 0x003fffffffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 7332 Comm: syz-executor.1 Not tainted 6.0.0-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
==================================================================

Crashes (661):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/10/03 15:50 upstream 4fe89d07dcc2 feb56351 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/10/02 09:33 upstream b357fd1c2afc feb56351 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/10/01 02:56 upstream 70575e77839f feb56351 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/30 00:56 upstream c3e0e1e23c70 45fd7169 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/26 14:23 upstream f76349cf4145 d59ba983 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/22 15:50 upstream dc164f4fb00a 0042f2b4 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/22 12:10 upstream dc164f4fb00a 60af5050 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/21 17:55 upstream 06f7db949993 380f82fb .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/20 07:34 upstream 521a547ced64 7c41a9ba .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/17 06:46 upstream a335366bad13 dd9a85ff .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/14 11:33 upstream 3245cb65fd91 b884348d .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/13 20:27 upstream d1221cea11fc b884348d .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/13 03:35 upstream e839a756012b f371ed7e .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/11 21:06 upstream 4ed9c1e971b1 356d8217 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/08 11:56 upstream 0066f1b0e275 f3027468 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/06 15:25 upstream 53e99dcff61e 65aea2b9 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/04 22:26 upstream 7e18e42e4b28 28811d0a .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/03 14:37 upstream d895ec7938c4 28811d0a .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/02 19:56 upstream 0b3acd1cc022 25194605 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/02 14:23 upstream 42e66b1cc3a0 25194605 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/02 14:21 upstream 42e66b1cc3a0 25194605 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/02 05:23 upstream 42e66b1cc3a0 a805568e .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/09/01 18:46 upstream 2880e1a175b9 86c46e46 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/31 19:01 upstream c5e4d5e99162 51e54e30 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/30 04:49 upstream dcf8e5633e2e 4a380809 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/29 17:07 upstream b90cb1053190 d7593c58 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/29 13:29 upstream b90cb1053190 94da0b6b .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/27 17:57 upstream 89b749d8552d 07177916 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/21 22:32 upstream e3f259d33c0e 26a13b38 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/21 08:31 upstream 15b3f48a4339 26a13b38 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/20 20:25 upstream f31c32efd57c 26a13b38 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/19 10:22 upstream 4c2d0b039c5c 26a13b38 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/18 14:34 upstream 3b06a2755758 d58e263f .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/17 04:27 upstream 7ebfc85e2cd7 9e4b39c2 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/16 02:14 upstream 7ebfc85e2cd7 7a7cb304 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/14 12:26 upstream 7ebfc85e2cd7 8dfcaa3d .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/12 14:43 upstream 7ebfc85e2cd7 402cd70d .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/11 21:40 upstream 2ae08b36c06e 21724cb2 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/10 21:03 upstream f41445645ab5 a6201f11 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/10 10:22 upstream d4252071b97d aaa9eaa0 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/08 18:25 upstream 3466f49dd0dd da700653 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2022/08/08 16:13 upstream 4e23eeebb2e5 da700653 .config log report info KCSAN: data-race in __xa_set_mark / xas_find_marked
ci2-upstream-kcsan-gce 2021/01/17 11:08 upstream 0da0a8a0a0e1 813be542 .config log report info
ci2-upstream-kcsan-gce 2020/09/24 17:40 upstream 171d4ff79f96 54289b08 .config log report info
ci2-upstream-kcsan-gce 2020/06/21 17:45 upstream 64677779e896 4f2acff9 .config log report
* Struck through repros no longer work on HEAD.