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: 535d, last: 2d17h
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 582d 672d 0/22 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 0xffff88812de87fb8 of 8 bytes by task 13926 on cpu 0:
 instrument_read_write include/linux/instrumented.h:57 [inline]
 __instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:81 [inline]
 __test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:109 [inline]
 node_clear_mark lib/xarray.c:100 [inline]
 xas_clear_mark lib/xarray.c:915 [inline]
 xas_init_marks+0x17e/0x320 lib/xarray.c:948
 xas_store+0x20e/0xc90 lib/xarray.c:810
 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+0x76c/0xa90 fs/ext4/inode.c:5499
 notify_change+0x9c3/0xa30 fs/attr.c:410
 do_truncate+0xf7/0x140 fs/open.c:65
 handle_truncate fs/namei.c:3132 [inline]
 do_open fs/namei.c:3480 [inline]
 path_openat+0x1834/0x1b30 fs/namei.c:3609
 do_filp_open+0x105/0x220 fs/namei.c:3636
 do_sys_openat2+0xb5/0x2a0 fs/open.c:1213
 do_sys_open fs/open.c:1229 [inline]
 __do_sys_openat fs/open.c:1245 [inline]
 __se_sys_openat fs/open.c:1240 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1240
 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+0x46/0xb0

read to 0xffff88812de87fb8 of 8 bytes by task 13921 on cpu 1:
 xas_find_chunk include/linux/xarray.h:1688 [inline]
 xas_find_marked+0x195/0x5e0 lib/xarray.c:1355
 find_get_entry mm/filemap.c:2032 [inline]
 find_get_pages_range_tag+0x103/0x480 mm/filemap.c:2314
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1122
 mpage_prepare_extent_to_map+0x192/0x8b0 fs/ext4/inode.c:2565
 ext4_writepages+0x5d6/0x1970 fs/ext4/inode.c:2758
 do_writepages+0x1db/0x350 mm/page-writeback.c:2352
 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:779
 ext4_sync_file+0xad/0x560 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2734 [inline]
 ext4_buffered_write_iter+0x23f/0x280 fs/ext4/file.c:277
 ext4_file_write_iter+0x211/0xdf0
 call_write_iter include/linux/fs.h:2052 [inline]
 new_sync_write fs/read_write.c:504 [inline]
 vfs_write+0x71c/0x890 fs/read_write.c:591
 ksys_write+0xe8/0x1a0 fs/read_write.c:644
 __do_sys_write fs/read_write.c:656 [inline]
 __se_sys_write fs/read_write.c:653 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:653
 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+0x46/0xb0

value changed: 0xffffffffc0000000 -> 0xffffe00000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 13921 Comm: syz-executor.1 Not tainted 5.18.0-syzkaller-01444-g0350785b0a09-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/12/2022
==================================================================

Crashes (387):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/05/24 22:55 upstream 0350785b0a09 647c0e27 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/24 08:52 upstream 140e40e39a29 e7f9308d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/23 11:20 upstream 4b0986a3613c 4c7657cb .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/21 06:50 upstream 3b5e1590a267 7268fa62 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/19 11:20 upstream f993aed406ea 50c53f39 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/18 16:10 upstream 210e04ff7681 50c53f39 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/16 21:41 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/12 18:34 upstream feb9c5e19e91 9ad6612a .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/08 21:53 upstream 379c72654524 e60b1103 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/06 22:34 upstream 64267926e01b e60b1103 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/05 01:13 upstream a7391ad35724 dc9e5259 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/04 19:29 upstream a7391ad35724 dc9e5259 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/03 20:07 upstream ef8e4d3c2ab1 dc9e5259 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/03 09:17 upstream 9050ba3a61a4 2df221f6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/05/02 23:07 upstream 9050ba3a61a4 2df221f6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/27 03:41 upstream cf424ef014ac 1fa34c1b .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/25 15:50 upstream af2d861d4cd2 152baedd .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/25 14:28 upstream af2d861d4cd2 131df97d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/25 09:09 upstream 42740a2ff5d3 131df97d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/21 06:03 upstream b253435746d9 d4befee1 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/20 10:45 upstream 559089e0a93d 7d7bc738 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/19 18:01 upstream b7f73403a3e9 33fc6ed6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/19 16:18 upstream b2d229d4ddb1 33fc6ed6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/19 10:43 upstream b2d229d4ddb1 c334415e .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/19 04:20 upstream b2d229d4ddb1 8bcc32a6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/17 00:12 upstream 90ea17a9e27b 8bcc32a6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/15 16:03 upstream 028192fea1de 8bcc32a6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/14 15:38 upstream a19944809fe9 b17b2923 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/13 04:50 upstream a19944809fe9 dacb3f1c .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/11 15:56 upstream ce522ba9ef7e af01ee7d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/08 12:40 upstream 42e7a03d3bad c6ff3e05 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/07 05:50 upstream 3e732ebf7316 53c67432 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/06 22:46 upstream 3e732ebf7316 97582466 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/05 18:08 upstream ce4c854ee868 0127c10f .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/02 23:06 upstream be2d3ecedd99 79a2a8fc .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/02 09:20 upstream 88e6c0207623 79a2a8fc .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/04/02 02:22 upstream d0d642a5d365 79a2a8fc .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/31 00:56 upstream 74164d284b29 9d49f3a7 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/30 12:20 upstream d888c83fcec7 42718dd6 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/30 09:53 upstream d888c83fcec7 6bdac766 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/28 20:21 upstream ae085d7f9365 6bdac766 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/27 20:24 upstream f022814633e1 89bc8608 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/25 02:29 upstream 52deda9551a0 89bc8608 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/24 12:03 upstream ed4643521e6a 89bc8608 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/22 17:19 upstream b47d5a4f6b8d d88ef0c5 .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/22 01:39 upstream eaa54b1458ca e2d91b1d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/21 07:44 upstream f443e374ae13 e2d91b1d .config log report info KCSAN: data-race in xas_find_marked / xas_init_marks
ci2-upstream-kcsan-gce 2022/03/20 20:04 upstream 14702b3b2438 e2d91b1d .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