syzbot


KCSAN: data-race in event_sched_in / perf_mmap

Status: auto-closed as invalid on 2021/12/17 06:55
Reported-by: syzbot+7f6c89a9e93efa694bbe@syzkaller.appspotmail.com
First crash: 389d, last: 389d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_in / perf_mmap (3) 1 245d 245d 0/24 auto-closed as invalid on 2022/05/09 23:29
upstream KCSAN: data-race in event_sched_in / perf_mmap (2) 1 294d 294d 0/24 auto-closed as invalid on 2022/03/21 20:07

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

write to 0xffff88813dd584d8 of 8 bytes by task 14507 on cpu 0:
 perf_set_shadow_time kernel/events/core.c:2512 [inline]
 perf_mmap+0xc36/0xe80 kernel/events/core.c:6352
 call_mmap include/linux/fs.h:2167 [inline]
 mmap_region+0xb00/0x10a0 mm/mmap.c:1786
 do_mmap+0x781/0xc20 mm/mmap.c:1575
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:519
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1623
 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 0xffff88813dd584d8 of 8 bytes by task 14594 on cpu 1:
 perf_set_shadow_time kernel/events/core.c:2512 [inline]
 event_sched_in+0x520/0xe90 kernel/events/core.c:2555
 group_sched_in kernel/events/core.c:2595 [inline]
 merge_sched_in kernel/events/core.c:3746 [inline]
 visit_groups_merge+0x943/0x1aa0 kernel/events/core.c:3696
 ctx_flexible_sched_in kernel/events/core.c:3788 [inline]
 ctx_sched_in+0x1e4/0x200 kernel/events/core.c:3833
 perf_event_sched_in kernel/events/core.c:2699 [inline]
 perf_event_context_sched_in kernel/events/core.c:3884 [inline]
 __perf_event_task_sched_in+0x37c/0x8d0 kernel/events/core.c:3927
 perf_event_task_sched_in include/linux/perf_event.h:1209 [inline]
 finish_task_switch+0x1ef/0x280 kernel/sched/core.c:4844
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0x44a/0x6a0 kernel/sched/core.c:6250
 schedule+0x81/0xb0 kernel/sched/core.c:6323
 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+0x28d/0x370 kernel/futex/syscalls.c:122
 __do_sys_futex kernel/futex/syscalls.c:199 [inline]
 __se_sys_futex+0xe8/0x370 kernel/futex/syscalls.c:180
 __x64_sys_futex+0x74/0x80 kernel/futex/syscalls.c:180
 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: 0xffffffd256f9377a -> 0xffffffd256f7df95

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14594 Comm: syz-executor.2 Not tainted 5.15.0-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/11/12 06:55 upstream ca2ef2d9f2aa 75b04091 .config log report info KCSAN: data-race in event_sched_in / perf_mmap
* Struck through repros no longer work on HEAD.