syzbot


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

Status: auto-closed as invalid on 2022/03/24 05:30
Reported-by: syzbot+df838a721c117d596976@syzkaller.appspotmail.com
First crash: 301d, last: 289d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (3) 1 673d 673d 0/24 auto-closed as invalid on 2021/03/04 07:39
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (4) 1 460d 460d 0/24 auto-closed as invalid on 2021/10/03 20:31
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (6) 2 242d 251d 0/24 auto-closed as invalid on 2022/05/09 12:46
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage 4 1038d 1123d 0/24 auto-closed as invalid on 2020/04/08 20:02
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (2) 1 865d 865d 0/24 auto-closed as invalid on 2020/08/25 03:47

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

read to 0xffff88815a5cd008 of 4 bytes by task 30339 on cpu 0:
 perf_event_update_userpage+0x1ba/0x3b0 kernel/events/core.c:5947
 cpu_clock_event_add+0x11d/0x130 kernel/events/core.c:10796
 event_sched_in+0x781/0xe60 kernel/events/core.c:2601
 group_sched_in kernel/events/core.c:2637 [inline]
 merge_sched_in kernel/events/core.c:3818 [inline]
 visit_groups_merge+0x943/0x1a50 kernel/events/core.c:3762
 ctx_flexible_sched_in kernel/events/core.c:3860 [inline]
 ctx_sched_in+0x221/0x240 kernel/events/core.c:3908
 perf_event_sched_in kernel/events/core.c:2741 [inline]
 perf_event_context_sched_in kernel/events/core.c:3959 [inline]
 __perf_event_task_sched_in+0x37c/0x8d0 kernel/events/core.c:4002
 perf_event_task_sched_in include/linux/perf_event.h:1213 [inline]
 finish_task_switch+0x1ef/0x280 kernel/sched/core.c:4862
 context_switch kernel/sched/core.c:4990 [inline]
 __schedule+0x43a/0x690 kernel/sched/core.c:6296
 schedule+0x81/0xb0 kernel/sched/core.c:6369
 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

write to 0xffff88815a5cd008 of 4 bytes by task 30338 on cpu 1:
 perf_event_update_userpage+0x357/0x3b0 kernel/events/core.c:5963
 perf_mmap+0xd34/0xeb0 kernel/events/core.c:6435
 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: 0x00000001 -> 0x00000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 30338 Comm: syz-executor.4 Not tainted 5.17.0-rc4-syzkaller-00052-g359303076163-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/02/17 05:29 upstream 359303076163 50221962 .config log report info KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage
ci2-upstream-kcsan-gce 2022/02/16 10:45 upstream c5d9ae265b10 8b9ca619 .config log report info KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage
ci2-upstream-kcsan-gce 2022/02/04 08:31 upstream dcb85f85fa6f 30646bfe .config log report info KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage
* Struck through repros no longer work on HEAD.