KCSAN: data-race in filemap_fdatawrite_wbc / xas_set_mark

11 views
Skip to first unread message

syzbot

unread,
May 9, 2022, 8:10:24 PM5/9/22
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9be9ed2612b5 Merge tag 'platform-drivers-x86-v5.18-4' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1567051ef00000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f644ed0e2a785f6
dashboard link: https://syzkaller.appspot.com/bug?extid=b97e9f65a69e70c39b6f
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
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+b97e9f...@syzkaller.appspotmail.com

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

write to 0xffff8881234f687c of 4 bytes by task 15192 on cpu 1:
xa_mark_set lib/xarray.c:69 [inline]
xas_set_mark+0x11e/0x130 lib/xarray.c:893
__folio_start_writeback+0x2bf/0x5d0 mm/page-writeback.c:2856
set_page_writeback+0x3d/0xe0 mm/folio-compat.c:78
ext4_bio_write_page+0x119/0xb60 fs/ext4/page-io.c:451
mpage_submit_page fs/ext4/inode.c:2090 [inline]
mpage_process_page_bufs+0x431/0x530 fs/ext4/inode.c:2204
mpage_prepare_extent_to_map+0x5b7/0xa50 fs/ext4/inode.c:2630
ext4_writepages+0x6b2/0x1d00 fs/ext4/inode.c:2758
do_writepages+0x1db/0x350 mm/page-writeback.c:2352
filemap_fdatawrite_wbc+0xd6/0xf0 mm/filemap.c:388
__filemap_fdatawrite_range mm/filemap.c:421 [inline]
file_write_and_wait_range+0xd6/0x170 mm/filemap.c:779
ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:188
generic_write_sync include/linux/fs.h:2732 [inline]
ext4_buffered_write_iter+0x2ec/0x330 fs/ext4/file.c:277
ext4_file_write_iter+0x2e3/0x1210
do_iter_readv_writev+0x27b/0x300
do_iter_write+0x16f/0x5c0 fs/read_write.c:852
vfs_iter_write+0x4c/0x70 fs/read_write.c:893
iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891
do_splice_direct+0xfb/0x180 fs/splice.c:979
do_sendfile+0x3ad/0x900 fs/read_write.c:1246
__do_sys_sendfile64 fs/read_write.c:1311 [inline]
__se_sys_sendfile64 fs/read_write.c:1297 [inline]
__x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1297
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881234f687c of 4 bytes by task 15182 on cpu 0:
xa_marked include/linux/xarray.h:419 [inline]
mapping_tagged include/linux/fs.h:458 [inline]
filemap_fdatawrite_wbc+0x57/0xf0 mm/filemap.c:384
__filemap_fdatawrite_range mm/filemap.c:421 [inline]
file_write_and_wait_range+0xd6/0x170 mm/filemap.c:779
ext4_sync_file+0x105/0x6d0 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:188
generic_write_sync include/linux/fs.h:2732 [inline]
ext4_buffered_write_iter+0x2ec/0x330 fs/ext4/file.c:277
ext4_file_write_iter+0x2e3/0x1210
do_iter_readv_writev+0x27b/0x300
do_iter_write+0x16f/0x5c0 fs/read_write.c:852
vfs_iter_write+0x4c/0x70 fs/read_write.c:893
iter_file_splice_write+0x44a/0x7c0 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/0x660 fs/splice.c:891
do_splice_direct+0xfb/0x180 fs/splice.c:979
do_sendfile+0x3ad/0x900 fs/read_write.c:1246
__do_sys_sendfile64 fs/read_write.c:1305 [inline]
__se_sys_sendfile64 fs/read_write.c:1297 [inline]
__x64_sys_sendfile64+0xb9/0x150 fs/read_write.c:1297
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x28000021 -> 0x10000021

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 15182 Comm: syz-executor.0 Not tainted 5.18.0-rc6-syzkaller-00007-g9be9ed2612b5 #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