syzbot


KCSAN: data-race in arch_perf_update_userpage / perf_mmap

Status: auto-closed as invalid on 2022/05/01 04:30
Subsystems: perf
[Documentation on labels]
First crash: 1051d, last: 1038d

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

read to 0xffff88813ae86028 of 8 bytes by task 29694 on cpu 0:
 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:10794
 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:4948
 context_switch kernel/sched/core.c:5076 [inline]
 __schedule+0x44b/0x6c0 kernel/sched/core.c:6382
 schedule+0x71/0xa0 kernel/sched/core.c:6454
 schedule_hrtimeout_range_clock+0xfc/0x1d0 kernel/time/hrtimer.c:2305
 schedule_hrtimeout_range+0x25/0x30 kernel/time/hrtimer.c:2350
 poll_schedule_timeout fs/select.c:244 [inline]
 do_select+0xde4/0xeb0 fs/select.c:607
 core_sys_select+0x440/0x6d0 fs/select.c:681
 do_pselect fs/select.c:763 [inline]
 __do_sys_pselect6+0x1ea/0x250 fs/select.c:804
 __se_sys_pselect6 fs/select.c:795 [inline]
 __x64_sys_pselect6+0x74/0x80 fs/select.c:795
 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 0xffff88813ae86028 of 8 bytes by task 29712 on cpu 1:
 perf_event_init_userpage kernel/events/core.c:5900 [inline]
 perf_mmap+0xcba/0xeb0 kernel/events/core.c:6434
 call_mmap include/linux/fs.h:2086 [inline]
 mmap_region+0xb04/0x10b0 mm/mmap.c:1791
 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: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: 0x0000000000000000 -> 0x0000000000000004

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

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/27 04:27 upstream bddac7c1e02b 89bc8608 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in arch_perf_update_userpage / perf_mmap
2022/03/14 05:08 upstream f0e18b03fcaf 9e8eaa75 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in arch_perf_update_userpage / perf_mmap
* Struck through repros no longer work on HEAD.