syzbot


KCSAN: data-race in xas_find_marked / xas_init_marks (2)

Status: moderation: reported on 2021/06/01 09:35
Reported-by: syzbot+a46b57de934a5996888a@syzkaller.appspotmail.com
First crash: 659d, last: 16h17m
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_find_marked / xas_init_marks 11 706d 796d 0/24 auto-closed as invalid on 2020/11/26 04:55

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

read-write to 0xffff8881222b1b38 of 8 bytes by task 17918 on cpu 0:
 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_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:114 [inline]
 node_clear_mark lib/xarray.c:100 [inline]
 xas_clear_mark lib/xarray.c:916 [inline]
 xas_init_marks+0x17e/0x320 lib/xarray.c:949
 xas_store+0x415/0xd10 lib/xarray.c:811
 page_cache_delete_batch+0x1bb/0x470 mm/filemap.c:312
 delete_from_page_cache_batch+0x18f/0x2a0 mm/filemap.c:334
 truncate_inode_pages_range+0x3ca/0xae0 mm/truncate.c:370
 truncate_inode_pages mm/truncate.c:452 [inline]
 truncate_pagecache+0x4f/0x70 mm/truncate.c:753
 ext4_setattr+0xb0a/0xf30 fs/ext4/inode.c:5516
 notify_change+0x9f8/0xb20 fs/attr.c:420
 do_truncate+0xf7/0x140 fs/open.c:65
 handle_truncate fs/namei.c:3216 [inline]
 do_open fs/namei.c:3561 [inline]
 path_openat+0x1802/0x1b00 fs/namei.c:3691
 do_filp_open+0x105/0x220 fs/namei.c:3718
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1313
 do_sys_open fs/open.c:1329 [inline]
 __do_sys_open fs/open.c:1337 [inline]
 __se_sys_open fs/open.c:1333 [inline]
 __x64_sys_open+0xe2/0x110 fs/open.c:1333
 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 0xffff8881222b1b38 of 8 bytes by task 17905 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: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+0x6b2/0x1cf0 fs/ext4/inode.c:2781
 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
 ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2869 [inline]
 ext4_buffered_write_iter+0x398/0x3e0 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e3/0x1210
 do_iter_write+0x494/0x750 fs/read_write.c:855
 vfs_writev fs/read_write.c:928 [inline]
 do_pwritev+0x235/0x430 fs/read_write.c:1025
 __do_sys_pwritev2 fs/read_write.c:1084 [inline]
 __se_sys_pwritev2 fs/read_write.c:1075 [inline]
 __x64_sys_pwritev2+0x7e/0xa0 fs/read_write.c:1075
 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: 0xffffffffffff0000 -> 0xffffffffffc00000

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

Crashes (492):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/09/28 00:17 upstream 46452d3786a8 75c78242 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/27 05:29 upstream 3800a713b607 10323ddf .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/24 12:33 upstream a63f2e7cb110 0042f2b4 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/23 17:09 upstream bf682942cd26 0042f2b4 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/22 12:27 upstream dc164f4fb00a 60af5050 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/21 17:35 upstream 06f7db949993 380f82fb .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/21 14:28 upstream 60891ec99e14 380f82fb .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/20 20:53 upstream 60891ec99e14 c4b8ccfd .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/20 09:33 upstream 521a547ced64 7c41a9ba .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/19 14:24 upstream 521a547ced64 dd9a85ff .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/19 07:39 upstream 521a547ced64 dd9a85ff .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/18 19:25 upstream 38eddeedbbea dd9a85ff .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/16 17:23 upstream 6879c2d3b960 dd9a85ff .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/15 08:05 upstream 3245cb65fd91 dd9a85ff .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/14 11:24 upstream 3245cb65fd91 b884348d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/14 03:12 upstream d1221cea11fc b884348d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/13 15:26 upstream d1221cea11fc a08652b0 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/13 09:13 upstream e839a756012b a08652b0 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/12 18:53 upstream 80e78fcce86d f371ed7e .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/12 11:05 upstream 80e78fcce86d 356d8217 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/11 21:12 upstream 4ed9c1e971b1 356d8217 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/10 20:22 upstream b96fbd602d35 356d8217 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/09 10:35 upstream 506357871c18 90058bdc .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/09 04:22 upstream 506357871c18 f3027468 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/08 14:30 upstream 26b1224903b3 f3027468 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/08 07:48 upstream 0066f1b0e275 435aeef7 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/07 12:16 upstream 0066f1b0e275 c5b7bc57 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/06 23:07 upstream d2ec799d1c1b 5fc30c37 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/05 13:01 upstream 7e18e42e4b28 922294ab .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/04 08:30 upstream 7726d4c3e60b 28811d0a .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/03 18:56 upstream 42cf58c272ee 28811d0a .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/03 15:14 upstream d895ec7938c4 28811d0a .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/02 05:53 upstream 42e66b1cc3a0 a805568e .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/01 15:19 upstream c5e4d5e99162 86c46e46 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/09/01 02:15 upstream c5e4d5e99162 b01ec571 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/31 18:50 upstream c5e4d5e99162 51e54e30 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/31 10:42 upstream dcf8e5633e2e 51e54e30 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/30 06:32 upstream dcf8e5633e2e 4a380809 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/28 21:40 upstream 8379c0b31fbc 07177916 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/28 10:24 upstream 10d4879f9ef0 07177916 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/27 18:25 upstream 89b749d8552d 07177916 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/27 02:23 upstream e022620b5d05 07177916 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/08/26 14:53 upstream 4c612826bec1 e5a303f1 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2021/05/31 23:36 upstream c2131f7e73c9 032639db .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2021/05/28 09:25 upstream 97e5bf604b7a 858ea628 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2021/01/16 21:15 upstream 54c6247d06f1 65a7a854 .config log report info
ci2-upstream-kcsan-gce 2020/12/07 21:22 upstream cd796ed33450 51a9082e .config log report info
* Struck through repros no longer work on HEAD.