KCSAN: data-race in file_write_and_wait_range / xas_set_mark

7 views
Skip to first unread message

syzbot

unread,
Aug 24, 2021, 4:18:29 AM8/24/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e22ce8eb631b Linux 5.14-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12fb2f16300000
kernel config: https://syzkaller.appspot.com/x/.config?x=f4e6864080265900
dashboard link: https://syzkaller.appspot.com/bug?extid=e6bdfe3f2f86bdca117d
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

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

write to 0xffff88815406e7e4 of 4 bytes by task 26173 on cpu 0:
xa_mark_set lib/xarray.c:69 [inline]
xas_set_mark+0x13e/0x150 lib/xarray.c:889
__test_set_page_writeback+0x27f/0x500 mm/page-writeback.c:2796
ext4_bio_write_page+0xee/0xa40 fs/ext4/page-io.c:450
mpage_submit_page fs/ext4/inode.c:2100 [inline]
mpage_process_page_bufs+0x437/0x560 fs/ext4/inode.c:2214
mpage_prepare_extent_to_map+0x4e6/0x640 fs/ext4/inode.c:2626
ext4_writepages+0x6c6/0x1d10 fs/ext4/inode.c:2754
do_writepages+0x7b/0x150 mm/page-writeback.c:2355
__filemap_fdatawrite_range mm/filemap.c:413 [inline]
file_write_and_wait_range+0x180/0x210 mm/filemap.c:792
ext4_sync_file+0x105/0x670 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2987 [inline]
ext4_buffered_write_iter+0x39c/0x3f0 fs/ext4/file.c:277
ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
call_write_iter include/linux/fs.h:2114 [inline]
do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
do_iter_write+0x112/0x4c0 fs/read_write.c:866
vfs_iter_write+0x4c/0x70 fs/read_write.c:907
iter_file_splice_write+0x40a/0x750 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x80/0xa0 fs/splice.c:936
splice_direct_to_actor+0x345/0x650 fs/splice.c:891
do_splice_direct+0xf5/0x170 fs/splice.c:979
do_sendfile+0x773/0xda0 fs/read_write.c:1260
__do_sys_sendfile64 fs/read_write.c:1325 [inline]
__se_sys_sendfile64 fs/read_write.c:1311 [inline]
__x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88815406e7e4 of 4 bytes by task 26182 on cpu 1:
xa_marked include/linux/xarray.h:418 [inline]
mapping_tagged include/linux/fs.h:489 [inline]
__filemap_fdatawrite_range mm/filemap.c:409 [inline]
file_write_and_wait_range+0x14d/0x210 mm/filemap.c:792
ext4_sync_file+0x105/0x670 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2987 [inline]
ext4_buffered_write_iter+0x39c/0x3f0 fs/ext4/file.c:277
ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
call_write_iter include/linux/fs.h:2114 [inline]
do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
do_iter_write+0x112/0x4c0 fs/read_write.c:866
vfs_iter_write+0x4c/0x70 fs/read_write.c:907
iter_file_splice_write+0x40a/0x750 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x80/0xa0 fs/splice.c:936
splice_direct_to_actor+0x345/0x650 fs/splice.c:891
do_splice_direct+0xf5/0x170 fs/splice.c:979
do_sendfile+0x773/0xda0 fs/read_write.c:1260
__do_sys_sendfile64 fs/read_write.c:1325 [inline]
__se_sys_sendfile64 fs/read_write.c:1311 [inline]
__x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0a000021 -> 0x04000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26182 Comm: syz-executor.4 Tainted: G W 5.14.0-rc7-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.

syzbot

unread,
May 10, 2022, 1:35:24 PM5/10/22
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