syzbot


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

Status: auto-closed as invalid on 2021/09/10 05:35
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 481d, last: 481d
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 545d 556d 0/24 auto-closed as invalid on 2021/07/08 04:06
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (6) 1 380d 380d 0/24 auto-closed as invalid on 2021/12/20 08:52
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (7) 2 331d 337d 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 431d 431d 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 763d 763d 0/24 auto-closed as invalid on 2020/12/02 23:00
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (2) 1 593d 593d 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 0xffff88812f97b880 of 8 bytes by task 27614 on cpu 1:
 __perf_update_times kernel/events/core.c:635 [inline]
 perf_event_update_time kernel/events/core.c:647 [inline]
 perf_event_set_state kernel/events/core.c:666 [inline]
 event_sched_out+0x2e9/0x7f0 kernel/events/core.c:2293
 group_sched_out+0xbf/0x1a0 kernel/events/core.c:2319
 ctx_sched_out+0x36f/0x410 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+0x64c/0xec0 kernel/events/core.c:3597
 perf_event_task_sched_out include/linux/perf_event.h:1228 [inline]
 prepare_task_switch+0x134/0x140 kernel/sched/core.c:4487
 context_switch kernel/sched/core.c:4635 [inline]
 __schedule+0x377/0x670 kernel/sched/core.c:5940
 schedule+0x67/0x90 kernel/sched/core.c:6019
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue_me+0x162/0x210 kernel/futex.c:2602
 futex_wait+0x143/0x430 kernel/futex.c:2704
 do_futex+0x9c1/0x1f10 kernel/futex.c:3730
 __do_sys_futex kernel/futex.c:3807 [inline]
 __se_sys_futex+0xc6/0x370 kernel/futex.c:3788
 __x64_sys_futex+0x74/0x80 kernel/futex.c:3788
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88812f97b880 of 8 bytes by task 27615 on cpu 0:
 __perf_update_times kernel/events/core.c:634 [inline]
 calc_timer_values kernel/events/core.c:5773 [inline]
 perf_event_update_userpage+0xcc/0x2f0 kernel/events/core.c:5828
 perf_mmap+0xb6f/0xce0 kernel/events/core.c:6315
 call_mmap include/linux/fs.h:2119 [inline]
 mmap_region+0xbcb/0x1400 mm/mmap.c:1808
 do_mmap+0x73f/0xc40 mm/mmap.c:1584
 vm_mmap_pgoff+0xf9/0x1d0 mm/util.c:519
 ksys_mmap_pgoff+0x2a8/0x380 mm/mmap.c:1635
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000000000 -> 0x0000000000010b63

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 27615 Comm: syz-executor.0 Tainted: G        W         5.14.0-rc4-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/08/06 05:31 upstream 902e7f373fff 2f537099 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_userpage
* Struck through repros no longer work on HEAD.