syzbot


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

Status: auto-closed as invalid on 2021/12/20 08:52
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 385d, last: 385d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (3) 2 550d 561d 0/24 auto-closed as invalid on 2021/07/08 04:06
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (7) 2 335d 342d 0/24 auto-closed as invalid on 2022/02/08 01:10
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (5) 1 436d 436d 0/24 auto-closed as invalid on 2021/10/30 02:46
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage 1 767d 767d 0/24 auto-closed as invalid on 2020/12/02 23:00
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (4) 1 486d 486d 0/24 auto-closed as invalid on 2021/09/10 05:35
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (2) 1 598d 598d 0/24 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 0xffff88813bf08cd0 of 8 bytes by task 19745 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_out+0x354/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]
 perf_event_context_sched_out kernel/events/core.c:3494 [inline]
 __perf_event_task_sched_out+0x679/0xf00 kernel/events/core.c:3597
 perf_event_task_sched_out include/linux/perf_event.h:1232 [inline]
 prepare_task_switch+0x13b/0x140 kernel/sched/core.c:4782
 context_switch kernel/sched/core.c:4924 [inline]
 __schedule+0x397/0x6a0 kernel/sched/core.c:6253
 schedule+0x81/0xb0 kernel/sched/core.c:6326
 exit_to_user_mode_loop kernel/entry/common.c:163 [inline]
 exit_to_user_mode_prepare+0xc5/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88813bf08cd0 of 8 bytes by task 19743 on cpu 1:
 __perf_update_times kernel/events/core.c:632 [inline]
 calc_timer_values kernel/events/core.c:5810 [inline]
 perf_event_update_userpage+0xcd/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: 0x00000000000096d0 -> 0x000000000001b619

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19743 Comm: syz-executor.4 Not tainted 5.15.0-syzkaller #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 2021/11/15 08:50 upstream ce49bfc8d037 75b04091 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_userpage
* Struck through repros no longer work on HEAD.