KCSAN: data-race in __fat_write_inode / copyout

5 views
Skip to first unread message

syzbot

unread,
Feb 22, 2020, 10:28:13 AM2/22/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: b12d66a6 mm, kcsan: Instrument SLAB free with ASSERT_EXCLU..
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=128e91d9e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=10bc0131c4924ba9
dashboard link: https://syzkaller.appspot.com/bug?extid=c6f60da7edd28776f3f5
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [hiro...@mail.parknet.co.jp linux-...@vger.kernel.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+c6f60d...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __fat_write_inode / copyout

write to 0xffff88810565a23c of 4 bytes by task 12797 on cpu 1:
__fat_write_inode+0x247/0x520 fs/fat/inode.c:877
fat_write_inode+0x6d/0xf0 fs/fat/inode.c:909
write_inode fs/fs-writeback.c:1312 [inline]
__writeback_single_inode+0x6f7/0x8e0 fs/fs-writeback.c:1511
writeback_single_inode+0x232/0x310 fs/fs-writeback.c:1565
sync_inode fs/fs-writeback.c:2602 [inline]
sync_inode_metadata+0x74/0xa0 fs/fs-writeback.c:2622
__generic_file_fsync+0x122/0x190 fs/libfs.c:1081
fat_file_fsync+0x58/0x120 fs/fat/file.c:190
vfs_fsync_range+0x82/0x150 fs/sync.c:197
generic_write_sync include/linux/fs.h:2867 [inline]
generic_file_write_iter+0x318/0x38c mm/filemap.c:3452
call_write_iter include/linux/fs.h:1901 [inline]
do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693
do_iter_write fs/read_write.c:998 [inline]
do_iter_write+0x13b/0x3c0 fs/read_write.c:979
vfs_iter_write+0x5c/0x80 fs/read_write.c:1039
iter_file_splice_write+0x536/0x850 fs/splice.c:760
do_splice_from fs/splice.c:863 [inline]
direct_splice_actor+0xa0/0xc0 fs/splice.c:1037
splice_direct_to_actor+0x22b/0x540 fs/splice.c:992
do_splice_direct+0x161/0x1e0 fs/splice.c:1080
do_sendfile+0x384/0x7f0 fs/read_write.c:1520
__do_sys_sendfile64 fs/read_write.c:1575 [inline]
__se_sys_sendfile64 fs/read_write.c:1567 [inline]
__x64_sys_sendfile64+0xbe/0x140 fs/read_write.c:1567
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810565a000 of 1377 bytes by task 12801 on cpu 0:
instrument_copy_to_user include/linux/instrumented.h:89 [inline]
copyout+0xa8/0xc0 lib/iov_iter.c:142
copy_page_to_iter_iovec lib/iov_iter.c:212 [inline]
copy_page_to_iter+0x252/0x8e0 lib/iov_iter.c:921
generic_file_buffered_read mm/filemap.c:2122 [inline]
generic_file_read_iter+0x978/0x1440 mm/filemap.c:2302
blkdev_read_iter+0xb2/0xe0 fs/block_dev.c:2039
call_read_iter include/linux/fs.h:1895 [inline]
new_sync_read+0x389/0x4f0 fs/read_write.c:414
__vfs_read+0xb1/0xc0 fs/read_write.c:427
vfs_read fs/read_write.c:461 [inline]
vfs_read+0x143/0x2c0 fs/read_write.c:446
ksys_read+0xd5/0x1b0 fs/read_write.c:587
__do_sys_read fs/read_write.c:597 [inline]
__se_sys_read fs/read_write.c:595 [inline]
__x64_sys_read+0x4c/0x60 fs/read_write.c:595
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 12801 Comm: blkid Not tainted 5.6.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,
Apr 25, 2020, 9:27:07 PM4/25/20
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