syzbot


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

Status: auto-closed as invalid on 2022/05/15 04:31
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 238d, last: 232d
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 (4) 1 286d 286d 0/24 auto-closed as invalid on 2022/03/22 15:18
upstream KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage 1 1120d 1120d 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 350d 350d 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 1076d 1076d 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-write to 0xffff8881377d1028 of 8 bytes by task 12675 on cpu 0:
 arch_perf_update_userpage+0x54/0x1e0 arch/x86/events/core.c:2726
 perf_event_update_userpage+0x3b1/0x420 kernel/events/core.c:5960
 cpu_clock_event_add+0x11d/0x130 kernel/events/core.c:10794
 event_sched_in+0x812/0xf40 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+0xb0d/0x2040 kernel/events/core.c:3762
 ctx_flexible_sched_in+0x4e/0x70 kernel/events/core.c:3860
 ctx_sched_in+0x1e0/0x1f0 kernel/events/core.c:3908
 perf_event_context_sched_in+0x289/0x4f0 kernel/events/core.c:3959
 __perf_event_task_sched_in+0x122/0x440 kernel/events/core.c:4002
 perf_event_task_sched_in include/linux/perf_event.h:1213 [inline]
 finish_task_switch+0x1cf/0x240 kernel/sched/core.c:4948
 context_switch kernel/sched/core.c:5076 [inline]
 __schedule+0x514/0x6c0 kernel/sched/core.c:6382
 preempt_schedule_common kernel/sched/core.c:6547 [inline]
 __cond_resched+0x3f/0xa0 kernel/sched/core.c:8154
 might_resched include/linux/kernel.h:119 [inline]
 might_alloc include/linux/sched/mm.h:257 [inline]
 slab_pre_alloc_hook mm/slab.h:722 [inline]
 slab_alloc mm/slab.c:3299 [inline]
 __kmem_cache_alloc_lru mm/slab.c:3493 [inline]
 kmem_cache_alloc+0x3c/0x300 mm/slab.c:3513
 getname_flags+0x82/0x350 fs/namei.c:138
 getname+0x15/0x20 fs/namei.c:217
 do_sys_openat2+0x6d/0x2a0 fs/open.c:1207
 do_sys_open fs/open.c:1229 [inline]
 __do_sys_creat fs/open.c:1305 [inline]
 __se_sys_creat fs/open.c:1299 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1299
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

write to 0xffff8881377d1028 of 8 bytes by task 12665 on cpu 1:
 arch_perf_update_userpage+0x82/0x1e0 arch/x86/events/core.c:2727
 perf_event_update_userpage+0x3b1/0x420 kernel/events/core.c:5960
 perf_mmap+0xa53/0xc10 kernel/events/core.c:6435
 call_mmap include/linux/fs.h:2055 [inline]
 mmap_region+0xae7/0x1080 mm/mmap.c:1791
 do_mmap+0x67a/0xb20 mm/mmap.c:1582
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:519
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1628
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000002 -> 0x0000000000000006

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12665 Comm: syz-executor.3 Not tainted 5.18.0-rc1-syzkaller-00328-ge1f700ebd6be-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/04/10 04:26 upstream e1f700ebd6be e22c3da3 .config log report info KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage
ci2-upstream-kcsan-gce 2022/04/03 16:39 upstream be2d3ecedd99 79a2a8fc .config log report info KCSAN: data-race in arch_perf_update_userpage / arch_perf_update_userpage
* Struck through repros no longer work on HEAD.