syzbot


KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage (4)

Status: auto-closed as invalid on 2022/03/22 15:18
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 284d, last: 284d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage (5) 2 230d 237d 0/24 auto-closed as invalid on 2022/05/15 04:31
upstream KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage 1 1118d 1118d 0/24 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage (3) 1 348d 348d 0/24 auto-closed as invalid on 2022/01/17 05:25
upstream KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage (2) 1 1074d 1074d 0/24 auto-closed as invalid on 2020/02/26 05:28

Sample crash report:
==================================================================
BUG: KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage

read to 0xffff888106ea7028 of 8 bytes by task 5568 on cpu 1:
 arch_perf_update_userpage+0x48/0x1f0 arch/x86/events/core.c:2725
 perf_event_update_userpage+0x33c/0x3b0 kernel/events/core.c:5960
 cpu_clock_event_add+0x11d/0x130 kernel/events/core.c:10796
 event_sched_in+0x781/0xe60 kernel/events/core.c:2601
 group_sched_in kernel/events/core.c:2637 [inline]
 merge_sched_in kernel/events/core.c:3818 [inline]
 visit_groups_merge+0x943/0x1a50 kernel/events/core.c:3762
 ctx_flexible_sched_in kernel/events/core.c:3860 [inline]
 ctx_sched_in+0x221/0x240 kernel/events/core.c:3908
 perf_event_sched_in kernel/events/core.c:2741 [inline]
 perf_event_context_sched_in kernel/events/core.c:3959 [inline]
 __perf_event_task_sched_in+0x37c/0x8d0 kernel/events/core.c:4002
 perf_event_task_sched_in include/linux/perf_event.h:1213 [inline]
 finish_task_switch+0x1ef/0x280 kernel/sched/core.c:4862
 context_switch kernel/sched/core.c:4990 [inline]
 __schedule+0x43a/0x690 kernel/sched/core.c:6296
 preempt_schedule_common kernel/sched/core.c:6462 [inline]
 __cond_resched+0x3f/0x90 kernel/sched/core.c:8175
 might_resched include/linux/kernel.h:110 [inline]
 might_alloc include/linux/sched/mm.h:256 [inline]
 slab_pre_alloc_hook mm/slab.h:705 [inline]
 slab_alloc mm/slab.c:3298 [inline]
 kmem_cache_alloc+0x45/0x320 mm/slab.c:3499
 kmem_cache_zalloc include/linux/slab.h:705 [inline]
 __alloc_file+0x2e/0x1a0 fs/file_table.c:134
 alloc_empty_file+0xcd/0x1c0 fs/file_table.c:183
 alloc_file+0x3a/0x280 fs/file_table.c:225
 alloc_file_pseudo+0xfa/0x150 fs/file_table.c:265
 sock_alloc_file+0x98/0x1b0 net/socket.c:463
 sock_map_fd net/socket.c:487 [inline]
 __sys_socket+0xf6/0x200 net/socket.c:1565
 __do_sys_socket net/socket.c:1570 [inline]
 __se_sys_socket net/socket.c:1568 [inline]
 __x64_sys_socket+0x3b/0x50 net/socket.c:1568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

write to 0xffff888106ea7028 of 8 bytes by task 5569 on cpu 0:
 arch_perf_update_userpage+0x8a/0x1f0 arch/x86/events/core.c:2727
 perf_event_update_userpage+0x33c/0x3b0 kernel/events/core.c:5960
 perf_mmap+0xd34/0xeb0 kernel/events/core.c:6435
 call_mmap include/linux/fs.h:2079 [inline]
 mmap_region+0xb04/0x10b0 mm/mmap.c:1793
 do_mmap+0x781/0xc20 mm/mmap.c:1582
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:519
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1630
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000002 -> 0x0000000000000006

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5569 Comm: syz-executor.1 Not tainted 5.17.0-rc4-syzkaller-00002-gd567f5db412e-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/15 15:16 upstream d567f5db412e 8b9ca619 .config log report info KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage
* Struck through repros no longer work on HEAD.