syzbot


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

Status: auto-closed as invalid on 2022/07/29 03:22
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 155d, last: 155d
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 565d 565d 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 467d 467d 0/24 auto-closed as invalid on 2021/09/20 12:41
upstream KCSAN: data-race in event_sched_in / perf_event_update_userpage (4) 1 296d 296d 0/24 auto-closed as invalid on 2022/03/10 14:25
upstream KCSAN: data-race in event_sched_in / perf_event_update_userpage 1 670d 670d 0/24 auto-closed as invalid on 2021/02/28 23:27

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

write to 0xffff88813b6f10c0 of 8 bytes by task 8116 on cpu 0:
 perf_event_update_time kernel/events/core.c:646 [inline]
 perf_event_set_state kernel/events/core.c:665 [inline]
 event_sched_in+0x216/0xf40 kernel/events/core.c:2494
 group_sched_in kernel/events/core.c:2546 [inline]
 merge_sched_in kernel/events/core.c:3725 [inline]
 visit_groups_merge+0xb30/0x2040 kernel/events/core.c:3669
 ctx_flexible_sched_in+0x4e/0x70 kernel/events/core.c:3767
 ctx_sched_in+0x1c2/0x1d0 kernel/events/core.c:3814
 perf_event_context_sched_in+0x27b/0x4e0 kernel/events/core.c:3864
 __perf_event_task_sched_in+0x6f/0x390 kernel/events/core.c:3897
 perf_event_task_sched_in include/linux/perf_event.h:1229 [inline]
 finish_task_switch+0x1e4/0x260 kernel/sched/core.c:5021
 context_switch kernel/sched/core.c:5149 [inline]
 __schedule+0x50d/0x6c0 kernel/sched/core.c:6458
 preempt_schedule_common kernel/sched/core.c:6623 [inline]
 __cond_resched+0x3f/0xa0 kernel/sched/core.c:8230
 _cond_resched include/linux/sched.h:2044 [inline]
 read_iter_zero+0x156/0x1f0 drivers/char/mem.c:502
 do_iter_readv_writev+0x27b/0x300
 do_iter_read+0x16f/0x5d0 fs/read_write.c:803
 vfs_readv fs/read_write.c:923 [inline]
 do_readv+0x17b/0x2b0 fs/read_write.c:960
 __do_sys_readv fs/read_write.c:1051 [inline]
 __se_sys_readv fs/read_write.c:1048 [inline]
 __x64_sys_readv+0x41/0x50 fs/read_write.c:1048
 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+0x46/0xb0

read to 0xffff88813b6f10c0 of 8 bytes by task 8126 on cpu 1:
 __perf_update_times kernel/events/core.c:633 [inline]
 calc_timer_values kernel/events/core.c:4395 [inline]
 perf_event_update_userpage+0x1d3/0x420 kernel/events/core.c:5833
 perf_mmap+0xa53/0xc10 kernel/events/core.c:6329
 call_mmap include/linux/fs.h:2063 [inline]
 mmap_region+0xa68/0xff0 mm/mmap.c:1796
 do_mmap+0x67a/0xb20 mm/mmap.c:1587
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:552
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1633
 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+0x46/0xb0

value changed: 0x00000000011b76cd -> 0x00000000011be552

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8126 Comm: syz-executor.5 Not tainted 5.19.0-rc3-syzkaller-00146-g92f20ff72066-dirty #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/06/24 03:21 upstream 92f20ff72066 912f5df7 .config log report info KCSAN: data-race in event_sched_in / perf_event_update_userpage
* Struck through repros no longer work on HEAD.