KCSAN: data-race in __writeback_single_inode / xas_set_mark (2)

4 views
Skip to first unread message

syzbot

unread,
Oct 1, 2020, 6:28:19 AM10/1/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 60e72093 Merge tag 'clk-fixes-for-linus' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=134fcda7900000
kernel config: https://syzkaller.appspot.com/x/.config?x=9c2006d5acc5d93b
dashboard link: https://syzkaller.appspot.com/bug?extid=97eeccf4d8f23c24c6ac
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 issue yet.

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

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

write to 0xffff88807fc43c3c of 4 bytes by task 23547 on cpu 0:
xa_mark_set lib/xarray.c:69 [inline]
xas_set_mark+0x11e/0x130 lib/xarray.c:886
__test_set_page_writeback+0x2b0/0x480 mm/page-writeback.c:2793
ext4_bio_write_page+0xed/0xda0 fs/ext4/page-io.c:453
mpage_submit_page fs/ext4/inode.c:2081 [inline]
mpage_process_page_bufs+0x4f5/0x600 fs/ext4/inode.c:2195
mpage_prepare_extent_to_map+0x4ec/0x650 fs/ext4/inode.c:2607
ext4_writepages+0x682/0x1ed0 fs/ext4/inode.c:2735
do_writepages+0x7b/0x150 mm/page-writeback.c:2352
__filemap_fdatawrite_range+0x19b/0x1d0 mm/filemap.c:422
file_write_and_wait_range+0x9f/0x120 mm/filemap.c:761
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:2747 [inline]
ext4_buffered_write_iter+0x369/0x3b0 fs/ext4/file.c:276
ext4_file_write_iter+0x768/0x1060 include/linux/fs.h:784
call_write_iter include/linux/fs.h:1882 [inline]
do_iter_readv_writev+0x32e/0x3d0 fs/read_write.c:721
do_iter_write+0x112/0x4b0 fs/read_write.c:1026
vfs_iter_write+0x4c/0x70 fs/read_write.c:1067
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+0x56a/0xba0 fs/read_write.c:1548
__do_sys_sendfile64 fs/read_write.c:1603 [inline]
__se_sys_sendfile64 fs/read_write.c:1595 [inline]
__x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1595
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88807fc43c3c of 4 bytes by task 23555 on cpu 1:
xa_marked include/linux/xarray.h:416 [inline]
mapping_tagged include/linux/fs.h:493 [inline]
__writeback_single_inode+0x26d/0x600 fs/fs-writeback.c:1507
writeback_single_inode+0x11f/0x580 fs/fs-writeback.c:1570
sync_inode fs/fs-writeback.c:2605 [inline]
sync_inode_metadata+0x52/0x70 fs/fs-writeback.c:2625
ext4_fsync_nojournal fs/ext4/fsync.c:92 [inline]
ext4_sync_file+0x335/0x6e0 fs/ext4/fsync.c:170
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2747 [inline]
ext4_buffered_write_iter+0x369/0x3b0 fs/ext4/file.c:276
ext4_file_write_iter+0x768/0x1060 include/linux/fs.h:784
call_write_iter include/linux/fs.h:1882 [inline]
do_iter_readv_writev+0x32e/0x3d0 fs/read_write.c:721
do_iter_write+0x112/0x4b0 fs/read_write.c:1026
vfs_iter_write+0x4c/0x70 fs/read_write.c:1067
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+0x56a/0xba0 fs/read_write.c:1548
__do_sys_sendfile64 fs/read_write.c:1603 [inline]
__se_sys_sendfile64 fs/read_write.c:1595 [inline]
__x64_sys_sendfile64+0xa9/0x130 fs/read_write.c:1595
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: 1 PID: 23555 Comm: syz-executor.5 Not tainted 5.9.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,
Jan 26, 2022, 4:38:16 AM1/26/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