KCSAN: data-race in ext4_has_free_clusters / percpu_counter_add_batch (2)

7 views
Skip to first unread message

syzbot

unread,
Dec 6, 2019, 12:15:09 AM12/6/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 05f22368 x86, kcsan: Enable KCSAN for x86
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=115b080f600000
kernel config: https://syzkaller.appspot.com/x/.config?x=87d111955f40591f
dashboard link: https://syzkaller.appspot.com/bug?extid=d581d0f1bc2569923e80
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+d581d0...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in ext4_has_free_clusters / percpu_counter_add_batch

read to 0xffff888218776958 of 8 bytes by task 12076 on cpu 1:
ext4_has_free_clusters+0x61/0x320 fs/ext4/balloc.c:555
ext4_claim_free_clusters+0x2e/0x90 fs/ext4/balloc.c:598
ext4_da_reserve_space+0x102/0x280 fs/ext4/inode.c:1612
ext4_insert_delayed_block fs/ext4/inode.c:1780 [inline]
ext4_da_map_blocks fs/ext4/inode.c:1895 [inline]
ext4_da_get_block_prep+0x87f/0xa60 fs/ext4/inode.c:1959
ext4_block_write_begin+0x33e/0xba0 fs/ext4/inode.c:1202
ext4_da_write_begin+0x1da/0x7e0 fs/ext4/inode.c:3094
generic_perform_write+0x136/0x320 mm/filemap.c:3304
__generic_file_write_iter+0x251/0x380 mm/filemap.c:3433
ext4_file_write_iter+0x1bd/0xa00 fs/ext4/file.c:268
call_write_iter include/linux/fs.h:1895 [inline]
new_sync_write+0x388/0x4a0 fs/read_write.c:483
__vfs_write+0xb1/0xc0 fs/read_write.c:496
vfs_write fs/read_write.c:558 [inline]
vfs_write+0x18a/0x390 fs/read_write.c:542
ksys_write+0xd5/0x1b0 fs/read_write.c:611
__do_sys_write fs/read_write.c:623 [inline]
__se_sys_write fs/read_write.c:620 [inline]
__x64_sys_write+0x4c/0x60 fs/read_write.c:620

write to 0xffff888218776958 of 8 bytes by task 12058 on cpu 0:
percpu_counter_add_batch+0xca/0x150 lib/percpu_counter.c:91
percpu_counter_add include/linux/percpu_counter.h:55 [inline]
ext4_claim_free_clusters+0x68/0x90 fs/ext4/balloc.c:599
ext4_da_reserve_space+0x102/0x280 fs/ext4/inode.c:1612
ext4_insert_delayed_block fs/ext4/inode.c:1780 [inline]
ext4_da_map_blocks fs/ext4/inode.c:1895 [inline]
ext4_da_get_block_prep+0x87f/0xa60 fs/ext4/inode.c:1959
ext4_block_write_begin+0x33e/0xba0 fs/ext4/inode.c:1202
ext4_da_write_begin+0x1da/0x7e0 fs/ext4/inode.c:3094
generic_perform_write+0x136/0x320 mm/filemap.c:3304
__generic_file_write_iter+0x251/0x380 mm/filemap.c:3433
ext4_file_write_iter+0x1bd/0xa00 fs/ext4/file.c:268
call_write_iter include/linux/fs.h:1895 [inline]
new_sync_write+0x388/0x4a0 fs/read_write.c:483
__vfs_write+0xb1/0xc0 fs/read_write.c:496
vfs_write fs/read_write.c:558 [inline]
vfs_write+0x18a/0x390 fs/read_write.c:542
ksys_write+0xd5/0x1b0 fs/read_write.c:611

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 12058 Comm: syz-executor.1 Not tainted 5.4.0-rc3+ #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,
Jun 18, 2020, 9:11:10 AM6/18/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