syzbot


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

Status: auto-closed as invalid on 2021/07/08 04:06
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 448d, last: 437d
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 (6) 1 272d 272d 0/23 auto-closed as invalid on 2021/12/20 08:52
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (7) 2 222d 229d 0/23 auto-closed as invalid on 2022/02/08 01:10
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (5) 1 323d 323d 0/23 auto-closed as invalid on 2021/10/30 02:46
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage 1 654d 654d 0/23 auto-closed as invalid on 2020/12/02 23:00
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (4) 1 373d 373d 0/23 auto-closed as invalid on 2021/09/10 05:35
upstream KCSAN: data-race in event_sched_out / perf_event_update_userpage (2) 1 485d 485d 0/23 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 0xffff888108f754b0 of 8 bytes by task 16064 on cpu 1:
 perf_event_update_time kernel/events/core.c:648 [inline]
 perf_event_set_state kernel/events/core.c:665 [inline]
 event_sched_out+0x326/0x7f0 kernel/events/core.c:2292
 group_sched_out+0xbf/0x1a0 kernel/events/core.c:2318
 ctx_sched_out+0x36f/0x410 kernel/events/core.c:3288
 task_ctx_sched_out kernel/events/core.c:2686 [inline]
 perf_event_context_sched_out kernel/events/core.c:3493 [inline]
 __perf_event_task_sched_out+0xc28/0xd30 kernel/events/core.c:3596
 perf_event_task_sched_out include/linux/perf_event.h:1228 [inline]
 prepare_task_switch+0x13d/0x140 kernel/sched/core.c:4143
 context_switch kernel/sched/core.c:4291 [inline]
 __schedule+0x374/0x5b0 kernel/sched/core.c:5147
 schedule+0x67/0x90 kernel/sched/core.c:5226
 freezable_schedule include/linux/freezer.h:172 [inline]
 futex_wait_queue_me+0x1a1/0x260 kernel/futex.c:2606
 futex_wait+0x143/0x430 kernel/futex.c:2708
 do_futex+0x9d8/0x1ee0 kernel/futex.c:3732
 __do_sys_futex kernel/futex.c:3805 [inline]
 __se_sys_futex+0x21c/0x380 kernel/futex.c:3786
 __x64_sys_futex+0x74/0x80 kernel/futex.c:3786
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888108f754b0 of 8 bytes by task 16030 on cpu 0:
 __perf_update_times kernel/events/core.c:631 [inline]
 calc_timer_values kernel/events/core.c:5763 [inline]
 perf_event_update_userpage+0xb9/0x2f0 kernel/events/core.c:5818
 perf_mmap+0xb6f/0xce0 kernel/events/core.c:6305
 call_mmap include/linux/fs.h:2119 [inline]
 mmap_region+0xbb6/0x13e0 mm/mmap.c:1811
 do_mmap+0x77d/0xc90 mm/mmap.c:1587
 vm_mmap_pgoff+0xfc/0x1d0 mm/util.c:519
 ksys_mmap_pgoff+0x2a8/0x380 mm/mmap.c:1638
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000000051e1 -> 0x0000000000010f37

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 16030 Comm: syz-executor.3 Not tainted 5.13.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/06/03 04:04 upstream 324c92e5e0ee 0740de69 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_userpage
ci2-upstream-kcsan-gce 2021/05/23 04:19 upstream 23d729263037 3c7fef33 .config log report info KCSAN: data-race in event_sched_out / perf_event_update_userpage