syzbot


KCSAN: data-race in event_sched_out / perf_event_update_time (2)

Status: auto-closed as invalid on 2022/09/14 15:38
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 108d, last: 108d
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 (3) 1 73d 73d 0/24 auto-obsoleted due to no activity on 2022/10/19 17:27
upstream KCSAN: data-race in event_sched_out / perf_event_update_time 2 196d 211d 0/24 auto-closed as invalid on 2022/06/17 20:49

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

read to 0xffff8881404c6688 of 8 bytes by task 26530 on cpu 1:
 __perf_update_times kernel/events/core.c:633 [inline]
 perf_event_update_time kernel/events/core.c:646 [inline]
 perf_event_set_state kernel/events/core.c:665 [inline]
 event_sched_out+0x446/0x9c0 kernel/events/core.c:2276
 group_sched_out+0xdb/0x1d0 kernel/events/core.c:2302
 ctx_sched_out+0x2b9/0x310 kernel/events/core.c:3265
 task_ctx_sched_out kernel/events/core.c:2640 [inline]
 perf_event_context_sched_out kernel/events/core.c:3470 [inline]
 __perf_event_task_sched_out+0x63e/0xf00 kernel/events/core.c:3573
 prepare_task_switch kernel/sched/core.c:4992 [inline]
 context_switch kernel/sched/core.c:5134 [inline]
 __schedule+0x43c/0x6e0 kernel/sched/core.c:6494
 schedule+0x51/0x80 kernel/sched/core.c:6570
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue+0xc9/0x160 kernel/futex/waitwake.c:355
 futex_wait+0x126/0x350 kernel/futex/waitwake.c:656
 do_futex+0x283/0x2b0 kernel/futex/syscalls.c:106
 __do_sys_futex kernel/futex/syscalls.c:183 [inline]
 __se_sys_futex+0xe8/0x350 kernel/futex/syscalls.c:164
 __x64_sys_futex+0x74/0x80 kernel/futex/syscalls.c:164
 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+0x63/0xcd

write to 0xffff8881404c6688 of 8 bytes by task 26529 on cpu 0:
 perf_event_update_time+0x15f/0x1c0 kernel/events/core.c:646
 perf_mmap+0xa4e/0xc20 kernel/events/core.c:6336
 call_mmap include/linux/fs.h:2197 [inline]
 mmap_region+0xa68/0xff0 mm/mmap.c:1749
 do_mmap+0x67a/0xb20 mm/mmap.c:1540
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:552
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1586
 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+0x63/0xcd

value changed: 0x00000000000177de -> 0x0000000000031010

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26529 Comm: syz-executor.4 Not tainted 5.19.0-syzkaller-13322-gd4252071b97d-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/08/10 15:29 upstream d4252071b97d aaa9eaa0 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_time
* Struck through repros no longer work on HEAD.