syzbot


KCSAN: data-race in event_sched_out / perf_event_update_userpage (7)

Status: auto-closed as invalid on 2022/02/08 01:10
Subsystems: perf
[Documentation on labels]
First crash: 1341d, last: 1334d
Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (3) perf 6 2 1549d 1560d 0/29 auto-closed as invalid on 2021/07/08 04:06
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (6) perf 6 1 1384d 1384d 0/29 auto-closed as invalid on 2021/12/20 08:52
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (5) perf 6 1 1435d 1435d 0/29 auto-closed as invalid on 2021/10/30 02:46
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage perf 6 1 1766d 1766d 0/29 auto-closed as invalid on 2020/12/02 23:00
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (4) perf 6 1 1485d 1485d 0/29 auto-closed as invalid on 2021/09/10 05:35
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (2) perf 6 1 1596d 1596d 0/29 auto-closed as invalid on 2021/05/21 17:09

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

write to 0xffff888131d5fcc0 of 8 bytes by task 8609 on cpu 0:
 perf_event_update_time kernel/events/core.c:647 [inline]
 perf_event_set_state kernel/events/core.c:666 [inline]
 event_sched_out+0x309/0x830 kernel/events/core.c:2293
 group_sched_out+0xf0/0x1f0 kernel/events/core.c:2319
 ctx_sched_out+0x391/0x450 kernel/events/core.c:3289
 task_ctx_sched_out kernel/events/core.c:2687 [inline]
 ctx_resched+0x108/0x250 kernel/events/core.c:2735
 __perf_install_in_context+0x20a/0x250 kernel/events/core.c:2817
 remote_function+0x96/0xb0 kernel/events/core.c:91
 generic_exec_single+0xb9/0x200 kernel/smp.c:518
 smp_call_function_single+0x165/0x310 kernel/smp.c:755
 task_function_call kernel/events/core.c:119 [inline]
 perf_install_in_context+0x326/0x460 kernel/events/core.c:2918
 __do_sys_perf_event_open kernel/events/core.c:12412 [inline]
 __se_sys_perf_event_open+0x1c7d/0x27c0 kernel/events/core.c:12020
 __x64_sys_perf_event_open+0x63/0x70 kernel/events/core.c:12020
 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

read to 0xffff888131d5fcc0 of 8 bytes by task 8607 on cpu 1:
 __perf_update_times kernel/events/core.c:634 [inline]
 calc_timer_values kernel/events/core.c:5810 [inline]
 perf_event_update_userpage+0xe2/0x340 kernel/events/core.c:5865
 perf_mmap+0xd0d/0xe80 kernel/events/core.c:6354
 call_mmap include/linux/fs.h:2167 [inline]
 mmap_region+0xb00/0x10a0 mm/mmap.c:1786
 do_mmap+0x781/0xc20 mm/mmap.c:1575
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:519
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1623
 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: 0x000000000050a946 -> 0x000000000053a36f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8607 Comm: syz-executor.2 Not tainted 5.16.0-rc8-syzkaller #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/01/04 01:10 upstream c9e6606c7fe9 4a3f34f2 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in event_sched_out / perf_event_update_userpage
2021/12/28 10:57 upstream a8ad9a2434dc 6b3c5e64 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in event_sched_out / perf_event_update_userpage
* Struck through repros no longer work on HEAD.