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

5 views
Skip to first unread message

syzbot

unread,
Jan 6, 2020, 3:54:14 PM1/6/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=11c0613ee00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a38292766f8efdaa
dashboard link: https://syzkaller.appspot.com/bug?extid=2a8ddd9ff1a9c8504e2f
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+2a8ddd...@syzkaller.appspotmail.com

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

read to 0xffff8881297bb958 of 8 bytes by task 13370 on cpu 0:
ext4_nonda_switch+0x5a/0x140 fs/ext4/inode.c:2892
ext4_da_write_begin+0xc5/0x840 fs/ext4/inode.c:2938
generic_perform_write+0x136/0x320 mm/filemap.c:3309
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]
aio_write+0x1de/0x2d0 fs/aio.c:1583
__io_submit_one fs/aio.c:1815 [inline]
io_submit_one+0x61d/0xdb0 fs/aio.c:1862
__do_sys_io_submit fs/aio.c:1921 [inline]
__se_sys_io_submit fs/aio.c:1891 [inline]
__x64_sys_io_submit+0x104/0x2a0 fs/aio.c:1891
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff8881297bb958 of 8 bytes by task 13389 on cpu 1:
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:1465
ext4_insert_delayed_block fs/ext4/inode.c:1633 [inline]
ext4_da_map_blocks fs/ext4/inode.c:1748 [inline]
ext4_da_get_block_prep+0x87f/0xa60 fs/ext4/inode.c:1812
ext4_block_write_begin+0x33e/0xba0 fs/ext4/inode.c:1055
ext4_da_write_begin+0x208/0x840 fs/ext4/inode.c:2996
generic_perform_write+0x136/0x320 mm/filemap.c:3309
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]
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
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: 13389 Comm: syz-executor.3 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,
Jun 18, 2020, 9:11:11 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