syzbot


KCSAN: data-race in event_sched_in / perf_event_update_userpage (4)

Status: auto-closed as invalid on 2022/03/10 14:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 305d, last: 305d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_in / perf_event_update_userpage (2) 1 574d 574d 0/24 auto-closed as invalid on 2021/06/14 16:13
upstream KCSAN: data-race in event_sched_in / perf_event_update_userpage (3) 1 476d 476d 0/24 auto-closed as invalid on 2021/09/20 12:41
upstream KCSAN: data-race in event_sched_in / perf_event_update_userpage 1 679d 679d 0/24 auto-closed as invalid on 2021/02/28 23:27
upstream KCSAN: data-race in event_sched_in / perf_event_update_userpage (5) 1 164d 164d 0/24 auto-closed as invalid on 2022/07/29 03:22

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

write to 0xffff888135d2d0d0 of 8 bytes by task 20576 on cpu 0:
 perf_event_update_time kernel/events/core.c:649 [inline]
 perf_event_set_state kernel/events/core.c:666 [inline]
 event_sched_in+0x216/0xe60 kernel/events/core.c:2585
 group_sched_in kernel/events/core.c:2637 [inline]
 merge_sched_in kernel/events/core.c:3802 [inline]
 visit_groups_merge+0x943/0x1a50 kernel/events/core.c:3746
 ctx_flexible_sched_in kernel/events/core.c:3844 [inline]
 ctx_sched_in+0x221/0x240 kernel/events/core.c:3892
 perf_event_sched_in kernel/events/core.c:2741 [inline]
 perf_event_context_sched_in kernel/events/core.c:3943 [inline]
 __perf_event_task_sched_in+0x37c/0x8d0 kernel/events/core.c:3986
 perf_event_task_sched_in include/linux/perf_event.h:1213 [inline]
 finish_task_switch+0x1ef/0x280 kernel/sched/core.c:4861
 context_switch kernel/sched/core.c:4989 [inline]
 __schedule+0x43a/0x690 kernel/sched/core.c:6295
 schedule+0x81/0xb0 kernel/sched/core.c:6368
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue+0xd1/0x170 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/0x370 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+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888135d2d0d0 of 8 bytes by task 20577 on cpu 1:
 __perf_update_times kernel/events/core.c:632 [inline]
 calc_timer_values kernel/events/core.c:4485 [inline]
 perf_event_update_userpage+0x12b/0x3b0 kernel/events/core.c:5923
 perf_mmap+0xcd6/0xe50 kernel/events/core.c:6419
 call_mmap include/linux/fs.h:2079 [inline]
 mmap_region+0xb04/0x10b0 mm/mmap.c:1793
 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:1630
 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: 0x0000000000074e2a -> 0x000000000007ae6e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20577 Comm: syz-executor.0 Not tainted 5.17.0-rc2-syzkaller-00060-g88808fbbead4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/03 14:20 upstream 88808fbbead4 4ebb2798 .config log report info KCSAN: data-race in event_sched_in / perf_event_update_userpage
* Struck through repros no longer work on HEAD.