KCSAN: data-race in ext4_writepages / xas_set_mark

6 views
Skip to first unread message

syzbot

unread,
Feb 16, 2020, 6:57:14 PM2/16/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=11432d6ee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=10bc0131c4924ba9
dashboard link: https://syzkaller.appspot.com/bug?extid=4a9201832b13e7cf72cc
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.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+4a9201...@syzkaller.appspotmail.com

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

write to 0xffff8880ad94271c of 4 bytes by task 8961 on cpu 1:
xa_mark_set lib/xarray.c:69 [inline]
xas_set_mark lib/xarray.c:886 [inline]
xas_set_mark+0x14d/0x160 lib/xarray.c:870
__test_set_page_writeback+0x610/0x7d0 mm/page-writeback.c:2785
set_page_writeback include/linux/page-flags.h:542 [inline]
ext4_bio_write_page+0x157/0xb79 fs/ext4/page-io.c:458
mpage_submit_page+0xe4/0x1a0 fs/ext4/inode.c:2074
mpage_process_page_bufs+0x3e5/0x400 fs/ext4/inode.c:2188
mpage_prepare_extent_to_map+0x48b/0x760 fs/ext4/inode.c:2597
ext4_writepages+0x585/0x1d40 fs/ext4/inode.c:2725
do_writepages+0x6b/0x170 mm/page-writeback.c:2344
__filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
file_write_and_wait_range+0xfd/0x160 mm/filemap.c:760
ext4_sync_file+0x266/0x8c0 fs/ext4/fsync.c:153
vfs_fsync_range+0x82/0x150 fs/sync.c:197
generic_write_sync include/linux/fs.h:2867 [inline]
ext4_buffered_write_iter+0x222/0x290 fs/ext4/file.c:277
ext4_file_write_iter+0xfa/0xd70 fs/ext4/file.c:642
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 0xffff8880ad94271c of 4 bytes by task 8958 on cpu 0:
mapping_tagged include/linux/fs.h:521 [inline]
ext4_writepages+0x1ad/0x1d40 fs/ext4/inode.c:2639
do_writepages+0x6b/0x170 mm/page-writeback.c:2344
__filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
filemap_write_and_wait_range mm/filemap.c:654 [inline]
filemap_write_and_wait_range+0xb1/0x150 mm/filemap.c:648
iomap_dio_rw+0x3a2/0x9a0 fs/iomap/direct-io.c:471
ext4_dio_write_iter fs/ext4/file.c:532 [inline]
ext4_file_write_iter+0xb15/0xd70 fs/ext4/file.c:640
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:1581 [inline]
__se_sys_sendfile64 fs/read_write.c:1567 [inline]
__x64_sys_sendfile64+0x12a/0x140 fs/read_write.c:1567
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: 8958 Comm: syz-executor.5 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,
Jan 15, 2022, 5:54:14 PM1/15/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