syzbot


KCSAN: data-race in ctx_sched_out / perf_event_update_time

Status: auto-obsoleted due to no activity on 2023/12/25 00:09
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+be9ddcf54db9300f44fa@syzkaller.appspotmail.com
First crash: 330d, last: 330d

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

read-write to 0xffff88815a7aa590 of 8 bytes by task 23754 on cpu 0:
 __update_context_time kernel/events/core.c:1458 [inline]
 update_context_time kernel/events/core.c:1475 [inline]
 ctx_sched_out+0x15b/0x300 kernel/events/core.c:3288
 task_ctx_sched_out kernel/events/core.c:2644 [inline]
 perf_event_context_sched_out kernel/events/core.c:3552 [inline]
 __perf_event_task_sched_out+0x3f4/0xe50 kernel/events/core.c:3651
 perf_event_task_sched_out include/linux/perf_event.h:1484 [inline]
 prepare_task_switch kernel/sched/core.c:5180 [inline]
 context_switch kernel/sched/core.c:5323 [inline]
 __schedule+0x8c4/0x8d0 kernel/sched/core.c:6688
 __schedule_loop kernel/sched/core.c:6763 [inline]
 schedule+0x54/0x80 kernel/sched/core.c:6778
 schedule_preempt_disabled+0x10/0x20 kernel/sched/core.c:6835
 rwsem_down_write_slowpath+0x39d/0x8d0 kernel/locking/rwsem.c:1178
 __down_write_common kernel/locking/rwsem.c:1306 [inline]
 __down_write_killable kernel/locking/rwsem.c:1320 [inline]
 down_write_killable+0x4d/0x90 kernel/locking/rwsem.c:1592
 mmap_write_lock_killable include/linux/mmap_lock.h:124 [inline]
 vm_mmap_pgoff+0xd9/0x240 mm/util.c:544
 ksys_mmap_pgoff+0x2b8/0x330 mm/mmap.c:1425
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88815a7aa590 of 8 bytes by task 23755 on cpu 1:
 perf_event_update_time+0xa0/0x1b0 kernel/events/core.c:639
 perf_mmap+0xa36/0xcb0 kernel/events/core.c:6588
 call_mmap include/linux/fs.h:2025 [inline]
 mmap_region+0xa56/0x16e0 mm/mmap.c:2851
 do_mmap+0x67e/0xa90 mm/mmap.c:1379
 vm_mmap_pgoff+0x12e/0x240 mm/util.c:546
 ksys_mmap_pgoff+0x2b8/0x330 mm/mmap.c:1425
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000000005e979 -> 0x00000000000604f9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23755 Comm: syz-executor.4 Not tainted 6.7.0-rc1-syzkaller-00012-g9bacdd8996c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/14 08:47 upstream 9bacdd8996c7 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in ctx_sched_out / perf_event_update_time
* Struck through repros no longer work on HEAD.