syzbot


KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage

Status: auto-closed as invalid on 2020/04/08 20:02
Reported-by: syzbot+3d30a087bef7b887dd14@syzkaller.appspotmail.com
First crash: 1018d, last: 920d
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 556d 556d 0/23 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 342d 342d 0/23 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 125d 133d 0/23 auto-closed as invalid on 2022/05/09 12:46
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (5) 3 171d 178d 0/23 auto-closed as invalid on 2022/03/24 05:30
upstream KCSAN: data-race in perf_event_update_userpage / perf_event_update_userpage (2) 1 747d 747d 0/23 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

write to 0xffff88809e973020 of 8 bytes by task 17508 on cpu 1:
 perf_event_update_userpage+0x257/0x340 kernel/events/core.c:5502
 cpu_clock_event_add+0x3d/0x60 kernel/events/core.c:9911
 event_sched_in.isra.0.part.0+0x1d5/0x560 kernel/events/core.c:2382
 event_sched_in kernel/events/core.c:2354 [inline]
 group_sched_in+0xd1/0x2c0 kernel/events/core.c:2418
 flexible_sched_in kernel/events/core.c:3463 [inline]
 flexible_sched_in+0x3a1/0x540 kernel/events/core.c:3452
 visit_groups_merge+0x1d9/0x320 kernel/events/core.c:3411
 ctx_flexible_sched_in kernel/events/core.c:3500 [inline]
 ctx_sched_in+0x1b4/0x360 kernel/events/core.c:3545
 perf_event_sched_in+0x77/0xb0 kernel/events/core.c:2527
 perf_event_context_sched_in kernel/events/core.c:3585 [inline]
 __perf_event_task_sched_in+0x354/0x390 kernel/events/core.c:3624
 perf_event_task_sched_in include/linux/perf_event.h:1179 [inline]
 finish_task_switch+0x104/0x260 kernel/sched/core.c:3222
 context_switch kernel/sched/core.c:3388 [inline]
 __schedule+0x30e/0x690 kernel/sched/core.c:4081
 schedule+0x4a/0x100 kernel/sched/core.c:4155
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue_me+0x18d/0x290 kernel/futex.c:2704
 futex_wait+0x19b/0x3f0 kernel/futex.c:2810
 do_futex+0xe9/0x18d0 kernel/futex.c:3881
 __do_sys_futex kernel/futex.c:3942 [inline]
 __se_sys_futex kernel/futex.c:3910 [inline]
 __x64_sys_futex+0x2cd/0x3f0 kernel/futex.c:3910
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88809e973020 of 8 bytes by task 17519 on cpu 0:
 perf_event_update_userpage+0x257/0x340 kernel/events/core.c:5502
 perf_mmap+0xe06/0xf00 kernel/events/core.c:5962
 call_mmap include/linux/fs.h:1907 [inline]
 mmap_region+0x7df/0xd50 mm/mmap.c:1784
 do_mmap+0x6c8/0xba0 mm/mmap.c:1555
 do_mmap_pgoff include/linux/mm.h:2338 [inline]
 vm_mmap_pgoff+0x12d/0x190 mm/util.c:506
 ksys_mmap_pgoff+0x2d8/0x420 mm/mmap.c:1607
 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
 __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline]
 __x64_sys_mmap+0x2e/0x40 arch/x86/kernel/sys_x86_64.c:91
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 17519 Comm: syz-executor.1 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/01/29 20:02 https://github.com/google/ktsan.git kcsan 245a43005292 5ed23f9a .config log report
ci2-upstream-kcsan-gce 2019/12/26 15:57 https://github.com/google/ktsan.git kcsan 245a43005292 be5c2c81 .config log report
ci2-upstream-kcsan-gce 2019/11/11 05:53 https://github.com/google/ktsan.git kcsan 94c006602e13 dc438b91 .config log report
ci2-upstream-kcsan-gce 2019/10/23 18:15 https://github.com/google/ktsan.git kcsan 05f2236801fe b602d64b .config log report