KCSAN: data-race in find_get_pages_range_tag / xas_set_mark

4 views
Skip to first unread message

syzbot

unread,
May 5, 2020, 10:06:13 PM5/5/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 7c3cd68e Merge remote-tracking branch 'linux-rcu/kcsan' in..
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=13671898100000
kernel config: https://syzkaller.appspot.com/x/.config?x=312e39c74fd784a1
dashboard link: https://syzkaller.appspot.com/bug?extid=242f60d9ff55d90d89f7
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org el...@google.com]

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+242f60...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in find_get_pages_range_tag / xas_set_mark

write to 0xffff8880b5a1cfb8 of 8 bytes by task 13557 on cpu 0:
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+0xc0/0x150 lib/xarray.c:879
tag_pages_for_writeback+0x100/0x370 mm/page-writeback.c:2114
write_cache_pages+0x52f/0xa10 mm/page-writeback.c:2186
mpage_writepages+0xab/0x180 fs/mpage.c:730
fat_writepages+0x2a/0x40 fs/fat/inode.c:205
do_writepages+0x6b/0x170 mm/page-writeback.c:2344
__filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
filemap_write_and_wait_range mm/filemap.c:654 [inline]
filemap_write_and_wait_range+0xad/0x140 mm/filemap.c:648
generic_file_direct_write+0x269/0x2f0 mm/filemap.c:3177
__generic_file_write_iter+0x170/0x370 mm/filemap.c:3388
generic_file_write_iter+0x294/0x38e mm/filemap.c:3463
call_write_iter include/linux/fs.h:1907 [inline]
do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:694
do_iter_write fs/read_write.c:999 [inline]
do_iter_write+0x137/0x3a0 fs/read_write.c:980
vfs_iter_write+0x56/0x80 fs/read_write.c:1040
iter_file_splice_write+0x530/0x830 fs/splice.c:760
do_splice_from fs/splice.c:863 [inline]
direct_splice_actor+0x97/0xb0 fs/splice.c:1037
splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
do_splice_direct+0x152/0x1d0 fs/splice.c:1080
do_sendfile+0x380/0x800 fs/read_write.c:1521
__do_sys_sendfile64 fs/read_write.c:1582 [inline]
__se_sys_sendfile64 fs/read_write.c:1568 [inline]
__x64_sys_sendfile64+0x121/0x140 fs/read_write.c:1568
do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880b5a1cfb8 of 8 bytes by task 13568 on cpu 1:
xas_find_chunk include/linux/xarray.h:1625 [inline]
xas_next_marked include/linux/xarray.h:1656 [inline]
find_get_pages_range_tag+0x39a/0x670 mm/filemap.c:1911
pagevec_lookup_range_tag+0x43/0x70 mm/swap.c:1078
write_cache_pages+0x173/0xa10 mm/page-writeback.c:2195
mpage_writepages+0xab/0x180 fs/mpage.c:730
fat_writepages+0x2a/0x40 fs/fat/inode.c:205
do_writepages+0x6b/0x170 mm/page-writeback.c:2344
__filemap_fdatawrite_range+0x1bb/0x220 mm/filemap.c:421
file_write_and_wait_range+0xfb/0x160 mm/filemap.c:760
__generic_file_fsync+0x55/0x180 fs/libfs.c:1072
fat_file_fsync+0x54/0x120 fs/fat/file.c:190
vfs_fsync_range+0x7c/0x150 fs/sync.c:197
generic_write_sync include/linux/fs.h:2872 [inline]
generic_file_write_iter+0x31c/0x38e mm/filemap.c:3467
call_write_iter include/linux/fs.h:1907 [inline]
do_iter_readv_writev+0x4a7/0x5d0 fs/read_write.c:694
do_iter_write fs/read_write.c:999 [inline]
do_iter_write+0x137/0x3a0 fs/read_write.c:980
vfs_iter_write+0x56/0x80 fs/read_write.c:1040
iter_file_splice_write+0x530/0x830 fs/splice.c:760
do_splice_from fs/splice.c:863 [inline]
direct_splice_actor+0x97/0xb0 fs/splice.c:1037
splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
do_splice_direct+0x152/0x1d0 fs/splice.c:1080
do_sendfile+0x380/0x800 fs/read_write.c:1521
__do_sys_sendfile64 fs/read_write.c:1582 [inline]
__se_sys_sendfile64 fs/read_write.c:1568 [inline]
__x64_sys_sendfile64+0x121/0x140 fs/read_write.c:1568
do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 13568 Comm: syz-executor.3 Not tainted 5.7.0-rc1-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.

syzbot

unread,
Mar 26, 2021, 11:10:14 AM3/26/21
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages