KCSAN: data-race in ext4_da_write_end / ext4_writepages

11 views
Skip to first unread message

syzbot

unread,
Jan 13, 2020, 2:24:12 PM1/13/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 245a4300 Merge branch 'rcu/kcsan' into tip/locking/kcsan
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=13dd0dc6e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4b9db179318d21f
dashboard link: https://syzkaller.appspot.com/bug?extid=ba34492cfb8d1dae57d0
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [adilger...@dilger.ca linux...@vger.kernel.org
linux-...@vger.kernel.org ty...@mit.edu 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+ba3449...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in ext4_da_write_end / ext4_writepages

write to 0xffff8880b594ba10 of 8 bytes by task 10343 on cpu 0:
mpage_map_and_submit_extent fs/ext4/inode.c:2478 [inline]
ext4_writepages+0x158c/0x2500 fs/ext4/inode.c:2771
do_writepages+0x6b/0x170 mm/page-writeback.c:2344
__filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
__filemap_fdatawrite mm/filemap.c:429 [inline]
filemap_flush+0x2d/0x40 mm/filemap.c:456
ext4_alloc_da_blocks+0x78/0x180 fs/ext4/inode.c:3145
ext4_release_file+0x10d/0x210 fs/ext4/file.c:141
__fput+0x1e1/0x520 fs/file_table.c:280
____fput+0x1f/0x30 fs/file_table.c:313
task_work_run+0xf6/0x130 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:164
prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
do_syscall_64+0x384/0x3a0 arch/x86/entry/common.c:304
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880b594ba10 of 8 bytes by task 10346 on cpu 1:
ext4_da_write_end+0xd0/0x620 fs/ext4/inode.c:3073
generic_perform_write+0x1d3/0x320 mm/filemap.c:3320
ext4_buffered_write_iter+0x143/0x290 fs/ext4/file.c:252
ext4_file_write_iter+0xf4/0xd40 fs/ext4/file.c:547
call_write_iter include/linux/fs.h:1902 [inline]
do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693
do_iter_write fs/read_write.c:970 [inline]
do_iter_write+0x13b/0x3c0 fs/read_write.c:951
vfs_iter_write+0x5c/0x80 fs/read_write.c:983
iter_file_splice_write+0x530/0x840 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:1464
__do_sys_sendfile64 fs/read_write.c:1525 [inline]
__se_sys_sendfile64 fs/read_write.c:1511 [inline]
__x64_sys_sendfile64+0x12a/0x140 fs/read_write.c:1511
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: 1 PID: 10346 Comm: syz-executor.1 Not tainted 5.5.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,
Nov 7, 2021, 1:00:18 AM11/7/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