KCSAN: data-race in ext4_ext_insert_extent / ext4_mark_iloc_dirty (3)

5 views
Skip to first unread message

syzbot

unread,
Sep 3, 2021, 4:29:19 PM9/3/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 4ac6d90867a4 Merge tag 'docs-5.15' of git://git.lwn.net/li..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13265ffe300000
kernel config: https://syzkaller.appspot.com/x/.config?x=f76d932b497ba172
dashboard link: https://syzkaller.appspot.com/bug?extid=a39bb0490dcaba7ea250
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
CC: [adilger...@dilger.ca linux...@vger.kernel.org linux-...@vger.kernel.org ty...@mit.edu]

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+a39bb0...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in ext4_ext_insert_extent / ext4_mark_iloc_dirty

write to 0xffff888101b80b40 of 4 bytes by task 5056 on cpu 1:
ext4_ext_store_pblock fs/ext4/ext4_extents.h:255 [inline]
ext4_ext_insert_extent+0x1a69/0x2c70 fs/ext4/extents.c:2120
ext4_ext_map_blocks+0x167d/0x1f00 fs/ext4/extents.c:4266
ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638
mpage_map_one_extent+0x10d/0x360 fs/ext4/inode.c:2395
mpage_map_and_submit_extent fs/ext4/inode.c:2448 [inline]
ext4_writepages+0xc2a/0x1d30 fs/ext4/inode.c:2800
do_writepages+0x8b/0x160 mm/page-writeback.c:2353
filemap_fdatawrite_wbc mm/filemap.c:402 [inline]
__filemap_fdatawrite_range mm/filemap.c:435 [inline]
file_write_and_wait_range+0x199/0x230 mm/filemap.c:812
ext4_sync_file+0x105/0x670 fs/ext4/fsync.c:151
vfs_fsync_range+0x107/0x120 fs/sync.c:200
generic_write_sync include/linux/fs.h:2950 [inline]
ext4_buffered_write_iter+0x3af/0x400 fs/ext4/file.c:277
ext4_file_write_iter+0x2e7/0x11a0 fs/ext4/file.c:519
call_write_iter include/linux/fs.h:2158 [inline]
do_iter_readv_writev+0x2cd/0x370 fs/read_write.c:729
do_iter_write+0x192/0x5c0 fs/read_write.c:855
vfs_iter_write+0x4c/0x70 fs/read_write.c:896
iter_file_splice_write+0x40a/0x750 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/0x650 fs/splice.c:891
do_splice_direct+0xf5/0x170 fs/splice.c:979
do_sendfile+0x618/0xb90 fs/read_write.c:1249
__do_sys_sendfile64 fs/read_write.c:1314 [inline]
__se_sys_sendfile64 fs/read_write.c:1300 [inline]
__x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1300
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888101b80b40 of 4 bytes by task 5045 on cpu 0:
ext4_do_update_inode fs/ext4/inode.c:5108 [inline]
ext4_mark_iloc_dirty+0xd85/0x1750 fs/ext4/inode.c:5723
__ext4_mark_inode_dirty+0x4db/0x5b0 fs/ext4/inode.c:5917
ext4_dirty_inode+0x86/0xa0 fs/ext4/inode.c:5946
__mark_inode_dirty+0x77/0x6a0 fs/fs-writeback.c:2398
mark_inode_dirty include/linux/fs.h:2447 [inline]
generic_write_end+0x157/0x180 fs/buffer.c:2198
ext4_da_write_end+0x59b/0x730 fs/ext4/inode.c:3110
generic_perform_write+0x23a/0x3d0 mm/filemap.c:3784
ext4_buffered_write_iter+0x305/0x400 fs/ext4/file.c:269
ext4_file_write_iter+0x2e7/0x11a0 fs/ext4/file.c:519
call_write_iter include/linux/fs.h:2158 [inline]
do_iter_readv_writev+0x2cd/0x370 fs/read_write.c:729
do_iter_write+0x192/0x5c0 fs/read_write.c:855
vfs_iter_write+0x4c/0x70 fs/read_write.c:896
iter_file_splice_write+0x40a/0x750 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/0x650 fs/splice.c:891
do_splice_direct+0xf5/0x170 fs/splice.c:979
do_sendfile+0x618/0xb90 fs/read_write.c:1249
__do_sys_sendfile64 fs/read_write.c:1314 [inline]
__se_sys_sendfile64 fs/read_write.c:1300 [inline]
__x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1300
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000708d0 -> 0x000708e0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5045 Comm: syz-executor.1 Tainted: G W 5.14.0-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,
Dec 12, 2021, 6:00:12 AM12/12/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