syzbot


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

Status: auto-obsoleted due to no activity on 2022/10/19 17:27
Subsystems: perf
[Documentation on labels]
First crash: 579d, last: 579d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in event_sched_out / perf_event_update_time (4) perf 1 478d 478d 0/26 auto-obsoleted due to no activity on 2023/02/05 14:53
upstream KCSAN: data-race in event_sched_out / perf_event_update_time (2) perf 1 615d 615d 0/26 auto-closed as invalid on 2022/09/14 15:38
upstream KCSAN: data-race in event_sched_out / perf_event_update_time perf 2 703d 718d 0/26 auto-closed as invalid on 2022/06/17 20:49

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

write to 0xffff88813bf93428 of 8 bytes by task 11065 on cpu 0:
 perf_event_update_time+0x18c/0x1c0 kernel/events/core.c:646
 perf_mmap+0xa4e/0xc20 kernel/events/core.c:6336
 call_mmap include/linux/fs.h:2192 [inline]
 mmap_region+0xa68/0xff0 mm/mmap.c:1752
 do_mmap+0x67a/0xb20 mm/mmap.c:1540
 vm_mmap_pgoff+0x117/0x1f0 mm/util.c:552
 ksys_mmap_pgoff+0x265/0x320 mm/mmap.c:1586
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88813bf93428 of 8 bytes by task 11066 on cpu 1:
 __perf_update_times kernel/events/core.c:637 [inline]
 perf_event_update_time kernel/events/core.c:646 [inline]
 perf_event_set_state kernel/events/core.c:665 [inline]
 event_sched_out+0x495/0x9c0 kernel/events/core.c:2276
 group_sched_out+0xdb/0x1d0 kernel/events/core.c:2302
 ctx_sched_out+0x2b9/0x310 kernel/events/core.c:3265
 task_ctx_sched_out kernel/events/core.c:2640 [inline]
 perf_event_context_sched_out kernel/events/core.c:3470 [inline]
 __perf_event_task_sched_out+0x63e/0xf00 kernel/events/core.c:3573
 prepare_task_switch kernel/sched/core.c:4992 [inline]
 context_switch kernel/sched/core.c:5134 [inline]
 __schedule+0x43c/0x6e0 kernel/sched/core.c:6494
 preempt_schedule_common kernel/sched/core.c:6663 [inline]
 __cond_resched+0x3f/0xa0 kernel/sched/core.c:8299
 might_resched include/linux/kernel.h:110 [inline]
 might_alloc include/linux/sched/mm.h:274 [inline]
 slab_pre_alloc_hook mm/slab.h:700 [inline]
 slab_alloc mm/slab.c:3278 [inline]
 kmem_cache_alloc_trace+0x42/0x320 mm/slab.c:3557
 kmalloc include/linux/slab.h:600 [inline]
 kzalloc include/linux/slab.h:733 [inline]
 io_rsrc_node_alloc io_uring/rsrc.c:253 [inline]
 io_rsrc_node_switch_start+0x53/0x110 io_uring/rsrc.c:300
 io_uring_create+0x424/0x664 io_uring/io_uring.c:3321
 io_uring_setup io_uring/io_uring.c:3407 [inline]
 __do_sys_io_uring_setup io_uring/io_uring.c:3413 [inline]
 __se_sys_io_uring_setup io_uring/io_uring.c:3410 [inline]
 __x64_sys_io_uring_setup+0x118/0x130 io_uring/io_uring.c:3410
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000040e1a -> 0x000000000013d9fb

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11066 Comm: syz-executor.4 Not tainted 6.0.0-rc5-syzkaller-00025-g3245cb65fd91-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/09/14 17:26 upstream 3245cb65fd91 b884348d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in event_sched_out / perf_event_update_time
* Struck through repros no longer work on HEAD.