syzbot


KCSAN: data-race in event_sched_out / perf_event_update_time

Status: auto-closed as invalid on 2022/06/17 20:49
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 221d, last: 206d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_out / perf_event_update_time (2) 1 117d 117d 0/24 auto-closed as invalid on 2022/09/14 15:38
upstream KCSAN: data-race in event_sched_out / perf_event_update_time (3) 1 82d 82d 0/24 auto-obsoleted due to no activity on 2022/10/19 17:27

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

read to 0xffff8881084964d0 of 8 bytes by task 25990 on cpu 0:
 __perf_update_times kernel/events/core.c:631 [inline]
 perf_event_update_time kernel/events/core.c:646 [inline]
 perf_event_set_state kernel/events/core.c:665 [inline]
 event_sched_out+0x434/0x9c0 kernel/events/core.c:2273
 group_sched_out+0xdb/0x1d0 kernel/events/core.c:2299
 ctx_sched_out+0x2b9/0x310 kernel/events/core.c:3262
 task_ctx_sched_out kernel/events/core.c:2637 [inline]
 ctx_resched+0xf8/0x240 kernel/events/core.c:2684
 __perf_install_in_context+0x36c/0x3d0 kernel/events/core.c:2766
 remote_function+0x96/0xb0 kernel/events/core.c:91
 generic_exec_single+0xb9/0x200 kernel/smp.c:518
 smp_call_function_single+0x16a/0x310 kernel/smp.c:755
 task_function_call kernel/events/core.c:119 [inline]
 perf_install_in_context+0x30e/0x4a0 kernel/events/core.c:2870
 __do_sys_perf_event_open kernel/events/core.c:12406 [inline]
 __se_sys_perf_event_open+0x1c1c/0x25c0 kernel/events/core.c:12014
 __x64_sys_perf_event_open+0x63/0x70 kernel/events/core.c:12014
 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 0xffff8881084964d0 of 8 bytes by task 25996 on cpu 1:
 perf_event_update_time+0x19c/0x1c0 kernel/events/core.c:648
 perf_mmap+0xa43/0xc10 kernel/events/core.c:6328
 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: 0x000000000001e19e -> 0x000000000004b488

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 25996 Comm: syz-executor.3 Not tainted 5.18.0-rc6-syzkaller-00085-gf3f19f939c11-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/05/13 20:42 upstream f3f19f939c11 7ce5a022 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_time
ci2-upstream-kcsan-gce 2022/04/29 04:34 upstream 259b897e5a79 e9076525 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_time
* Struck through repros no longer work on HEAD.