KCSAN: data-race in __xa_clear_mark / xas_find_marked

0 views
Skip to first unread message

syzbot

unread,
Jul 7, 2020, 8:52:22 PM7/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: aa27b32b Merge tag 'for-5.8-rc4-tag' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1016fd2f100000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb5fa7cd98e489a1
dashboard link: https://syzkaller.appspot.com/bug?extid=59f493df10caea1c249d
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project.git ca2dcbd030eadbf0aa9b660efe864ff08af6e18b)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

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

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

write to 0xffff8880bacf2b30 of 8 bytes by task 7 on cpu 1:
instrument_write include/linux/instrumented.h:42 [inline]
__test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:85 [inline]
node_clear_mark lib/xarray.c:100 [inline]
xas_clear_mark lib/xarray.c:908 [inline]
__xa_clear_mark+0x2bd/0x350 lib/xarray.c:1726
test_clear_page_writeback+0x28d/0x480 mm/page-writeback.c:2741
end_page_writeback+0xa7/0x110 mm/filemap.c:1314
ext4_finish_bio+0x429/0x490 fs/ext4/page-io.c:146
ext4_release_io_end+0x98/0x200 fs/ext4/page-io.c:161
ext4_end_io_end fs/ext4/page-io.c:195 [inline]
ext4_do_flush_completed_IO fs/ext4/page-io.c:260 [inline]
ext4_end_io_rsv_work+0x306/0x360 fs/ext4/page-io.c:274
process_one_work+0x3e1/0x9a0 kernel/workqueue.c:2269
worker_thread+0x665/0xbe0 kernel/workqueue.c:2415
kthread+0x20d/0x230 kernel/kthread.c:291
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293

read to 0xffff8880bacf2b30 of 8 bytes by task 13590 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/0x580 mm/filemap.c:1908
pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1120
__filemap_fdatawait_range+0xab/0x1b0 mm/filemap.c:518
file_write_and_wait_range+0xea/0x120 mm/filemap.c:764
ext4_sync_file+0xfc/0x6e0 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2882 [inline]
ext4_buffered_write_iter+0x369/0x3b0 fs/ext4/file.c:277
ext4_file_write_iter+0x76f/0x1010 include/linux/fs.h:804
call_write_iter include/linux/fs.h:1907 [inline]
do_iter_readv_writev+0x321/0x3c0 fs/read_write.c:694
do_iter_write+0x10e/0x470 fs/read_write.c:999
vfs_iter_write+0x4c/0x70 fs/read_write.c:1040
iter_file_splice_write+0x41a/0x770 fs/splice.c:750
do_splice_from fs/splice.c:846 [inline]
direct_splice_actor+0x95/0x160 fs/splice.c:1016
splice_direct_to_actor+0x365/0x660 fs/splice.c:971
do_splice_direct+0xf2/0x170 fs/splice.c:1059
do_sendfile+0x562/0xb10 fs/read_write.c:1521
__do_sys_sendfile64 fs/read_write.c:1576 [inline]
__se_sys_sendfile64 fs/read_write.c:1568 [inline]
__x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1568
do_syscall_64+0x51/0xb0 arch/x86/entry/common.c:384
entry_SYSCALL_64_after_hwframe+0x44/0xa9

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


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

Marco Elver

unread,
Aug 10, 2020, 8:41:05 AM8/10/20
to syzbot, 'Dmitry Vyukov' via syzkaller-upstream-moderation
#syz upstream
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-upstream-moderation" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-upstream-m...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-upstream-moderation/0000000000004279c905a9e38538%40google.com.
Reply all
Reply to author
Forward
0 new messages