KCSAN: data-race in __xa_set_mark / xas_find_marked

9 views
Skip to first unread message

syzbot

unread,
Sep 25, 2020, 4:57:17 AM9/25/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 171d4ff7 Merge tag 'mmc-v5.9-rc4-2' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15a8b48d900000
kernel config: https://syzkaller.appspot.com/x/.config?x=7b00edac59eadd4a
dashboard link: https://syzkaller.appspot.com/bug?extid=f512479ce46e8f0a9370
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project.git ca2dcbd030eadbf0aa9b660efe864ff08af6e18b)
CC: [linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f51247...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __xa_set_mark / xas_find_marked

write to 0xffff88811d107468 of 8 bytes by task 16793 on cpu 1:
instrument_write include/linux/instrumented.h:42 [inline]
__test_and_set_bit include/asm-generic/bitops/instrumented-non-atomic.h:71 [inline]
node_set_mark lib/xarray.c:93 [inline]
xas_set_mark lib/xarray.c:879 [inline]
__xa_set_mark+0x2a3/0x330 lib/xarray.c:1708
__set_page_dirty+0x17e/0x1d0 fs/buffer.c:609
mark_buffer_dirty+0x12e/0x260 fs/buffer.c:1137
__block_commit_write fs/buffer.c:2084 [inline]
block_write_end+0x13d/0x220 fs/buffer.c:2162
generic_write_end+0x5c/0x250 fs/buffer.c:2176
ext4_da_write_end+0x57e/0x760 fs/ext4/inode.c:3091
generic_perform_write+0x23b/0x390 mm/filemap.c:3512
ext4_buffered_write_iter+0x2cc/0x3b0 fs/ext4/file.c:269
ext4_file_write_iter+0x768/0x1060 include/linux/fs.h:784
call_write_iter include/linux/fs.h:1882 [inline]
new_sync_write fs/read_write.c:503 [inline]
vfs_write+0x665/0x6f0 fs/read_write.c:578
ksys_write+0xce/0x180 fs/read_write.c:631
__do_sys_write fs/read_write.c:643 [inline]
__se_sys_write fs/read_write.c:640 [inline]
__x64_sys_write+0x3e/0x50 fs/read_write.c:640
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88811d107468 of 8 bytes by task 16796 on cpu 0:
xas_find_chunk include/linux/xarray.h:1625 [inline]
xas_find_marked+0x22f/0x6b0 lib/xarray.c:1198
find_get_pages_range_tag+0xa3/0x5b0 mm/filemap.c:2074
pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1122
mpage_prepare_extent_to_map+0x19c/0x650 fs/ext4/inode.c:2558
ext4_writepages+0x97d/0x1ed0 fs/ext4/inode.c:2779
do_writepages+0x7b/0x150 mm/page-writeback.c:2352
__filemap_fdatawrite_range+0x19b/0x1d0 mm/filemap.c:422
generic_fadvise+0x316/0x420 mm/fadvise.c:113
vfs_fadvise mm/fadvise.c:185 [inline]
ksys_fadvise64_64 mm/fadvise.c:199 [inline]
__do_sys_fadvise64 mm/fadvise.c:214 [inline]
__se_sys_fadvise64 mm/fadvise.c:212 [inline]
__x64_sys_fadvise64+0xc5/0x100 mm/fadvise.c:212
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: 0 PID: 16796 Comm: syz-executor.3 Not tainted 5.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
Reply all
Reply to author
Forward
0 new messages