syzbot


KCSAN: data-race in xas_find_marked / xas_init_marks

Status: auto-closed as invalid on 2020/11/26 04:55
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 756d, last: 666d
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 (2) 438 1d13h 444d 0/23 moderation: reported on 2021/06/01 09:35

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

read-write to 0xffff88810229afb8 of 8 bytes by task 11888 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:911 [inline]
 xas_init_marks+0x17e/0x310 lib/xarray.c:944
 xas_store+0x1f7/0xcb0 lib/xarray.c:806
 page_cache_delete_batch mm/filemap.c:337 [inline]
 delete_from_page_cache_batch+0x3e4/0x800 mm/filemap.c:358
 truncate_inode_pages_range+0x482/0xf20 mm/truncate.c:366
 truncate_pagecache_range+0x80/0x90 mm/truncate.c:953
 ext4_punch_hole+0x36b/0x9b0 fs/ext4/inode.c:4030
 ext4_fallocate+0xe5/0x510 fs/ext4/extents.c:4653
 vfs_fallocate+0x43d/0x5d0 fs/open.c:309
 ksys_fallocate fs/open.c:332 [inline]
 __do_sys_fallocate fs/open.c:340 [inline]
 __se_sys_fallocate fs/open.c:338 [inline]
 __x64_sys_fallocate+0x75/0xc0 fs/open.c:338
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810229afb8 of 8 bytes by task 11881 on cpu 1:
 xas_find_chunk include/linux/xarray.h:1660 [inline]
 xas_find_marked+0x22f/0x6b0 lib/xarray.c:1348
 find_get_pages_range_tag+0xa3/0x600 mm/filemap.c:2094
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1161
 mpage_prepare_extent_to_map+0x18a/0x630 fs/ext4/inode.c:2558
 ext4_writepages+0x968/0x1e10 fs/ext4/inode.c:2779
 do_writepages+0x7b/0x150 mm/page-writeback.c:2352
 __filemap_fdatawrite_range+0x19d/0x1d0 mm/filemap.c:422
 file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
 ext4_sync_file+0xfc/0x690 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2725 [inline]
 ext4_buffered_write_iter+0x363/0x3b0 fs/ext4/file.c:276
 ext4_file_write_iter+0x480/0x10b0 fs/ext4/file.c:501
 call_write_iter include/linux/fs.h:1887 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x630/0x6b0 fs/read_write.c:586
 ksys_write+0xce/0x180 fs/read_write.c:639
 __do_sys_write fs/read_write.c:651 [inline]
 __se_sys_write fs/read_write.c:648 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:648
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11881 Comm: syz-executor.0 Not tainted 5.9.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (11):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/10/22 04:51 upstream f804b3159482 be6b1582 .config log report info
ci2-upstream-kcsan-gce 2020/10/15 10:54 upstream 3e4fb4346c78 63869021 .config log report info
ci2-upstream-kcsan-gce 2020/09/30 21:52 upstream 60e720931556 a9767fb2 .config log report info
ci2-upstream-kcsan-gce 2020/09/18 14:20 upstream 10b82d517648 38962c8b .config log report info
ci2-upstream-kcsan-gce 2020/09/16 12:18 upstream fc4f28bb3daf 18d7d030 .config log report info
ci2-upstream-kcsan-gce 2020/09/02 15:00 upstream 9c7d619be5a0 abf9ba4f .config log report
ci2-upstream-kcsan-gce 2020/08/14 04:29 upstream 990f227371a4 54ce1ed6 .config log report
ci2-upstream-kcsan-gce 2020/08/11 01:10 upstream 4bcf69e57063 d3694ffb .config log report
ci2-upstream-kcsan-gce 2020/08/03 05:20 upstream 142c3326b055 96dd3623 .config log report
ci2-upstream-kcsan-gce 2020/07/31 13:31 upstream d8b9faec54ae 8df85ed9 .config log report
ci2-upstream-kcsan-gce 2020/07/23 17:39 upstream d15be546031c 70c104a1 .config log report