KCSAN: data-race in alloc_empty_file / percpu_counter_add_batch

4 views
Skip to first unread message

syzbot

unread,
Mar 1, 2020, 7:43:13 PM3/1/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 766d004d 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=10813645e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=b313b4492ea15bae
dashboard link: https://syzkaller.appspot.com/bug?extid=929830e31a3536e07ab6
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk 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+929830...@syzkaller.appspotmail.com

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

write to 0xffffffff85a08588 of 8 bytes by task 21841 on cpu 0:
percpu_counter_add_batch+0xbc/0x140 lib/percpu_counter.c:91
percpu_counter_add include/linux/percpu_counter.h:55 [inline]
percpu_counter_inc include/linux/percpu_counter.h:179 [inline]
alloc_empty_file+0xce/0x180 fs/file_table.c:153
path_openat+0x72/0x2f70 fs/namei.c:3596
do_filp_open+0x11e/0x1b0 fs/namei.c:3637
do_sys_openat2+0x4f5/0x620 fs/open.c:1149
do_sys_open+0xa2/0x110 fs/open.c:1165
ksys_open include/linux/syscalls.h:1386 [inline]
__do_sys_open fs/open.c:1171 [inline]
__se_sys_open fs/open.c:1169 [inline]
__x64_sys_open+0x50/0x60 fs/open.c:1169
do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffffff85a08588 of 8 bytes by task 21858 on cpu 1:
get_nr_files fs/file_table.c:66 [inline]
alloc_empty_file+0x29/0x180 fs/file_table.c:142
path_openat+0x72/0x2f70 fs/namei.c:3596
do_filp_open+0x11e/0x1b0 fs/namei.c:3637
do_open_execat+0x117/0x3d0 fs/exec.c:860
__do_execve_file.isra.0+0xda0/0x1120 fs/exec.c:1765
do_execveat_common fs/exec.c:1871 [inline]
do_execve fs/exec.c:1888 [inline]
__do_sys_execve fs/exec.c:1964 [inline]
__se_sys_execve fs/exec.c:1959 [inline]
__x64_sys_execve+0x5e/0x70 fs/exec.c:1959
do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 21858 Comm: udevd 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,
Jun 18, 2020, 9:11:12 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