syzbot


KCSAN: data-race in __change_pid / perf_event_switch_output (2)

Status: auto-obsoleted due to no activity on 2024/06/27 05:34
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+b2215ca4becf45ad7e76@syzkaller.appspotmail.com
First crash: 197d, last: 197d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __change_pid / perf_event_switch_output perf 1 251d 251d 0/28 auto-obsoleted due to no activity on 2024/05/04 07:21
upstream KCSAN: data-race in __change_pid / perf_event_switch_output (3) perf 1 125d 125d 0/28 auto-obsoleted due to no activity on 2024/09/07 09:20

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __change_pid / perf_event_switch_output

write to 0xffff8881296de8e8 of 8 bytes by task 6369 on cpu 1:
 __change_pid+0xe9/0x1c0 kernel/pid.c:356
 detach_pid+0x1c/0x30 kernel/pid.c:372
 __unhash_process kernel/exit.c:129 [inline]
 __exit_signal kernel/exit.c:201 [inline]
 release_task+0x6c3/0xc30 kernel/exit.c:258
 wait_task_zombie kernel/exit.c:1188 [inline]
 wait_consider_task+0x116b/0x1670 kernel/exit.c:1415
 do_wait_thread kernel/exit.c:1478 [inline]
 __do_wait+0x100/0x500 kernel/exit.c:1596
 do_wait+0xaf/0x270 kernel/exit.c:1630
 kernel_wait4+0x164/0x1d0 kernel/exit.c:1789
 __do_sys_wait4 kernel/exit.c:1817 [inline]
 __se_sys_wait4 kernel/exit.c:1813 [inline]
 __x64_sys_wait4+0x94/0x120 kernel/exit.c:1813
 x64_sys_call+0x61d/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:62
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881296de8e8 of 8 bytes by task 12742 on cpu 0:
 pid_alive include/linux/pid.h:263 [inline]
 perf_event_pid_type kernel/events/core.c:1334 [inline]
 perf_event_pid kernel/events/core.c:1341 [inline]
 perf_event_switch_output+0x19e/0x390 kernel/events/core.c:9061
 perf_iterate_sb_cpu kernel/events/core.c:8003 [inline]
 perf_iterate_sb+0x34b/0x640 kernel/events/core.c:8032
 perf_event_switch kernel/events/core.c:9108 [inline]
 __perf_event_task_sched_in+0x789/0x7f0 kernel/events/core.c:4018
 perf_event_task_sched_in include/linux/perf_event.h:1473 [inline]
 finish_task_switch+0x218/0x2b0 kernel/sched/core.c:5277
 context_switch kernel/sched/core.c:5411 [inline]
 __schedule+0x5e8/0x940 kernel/sched/core.c:6745
 __schedule_loop kernel/sched/core.c:6822 [inline]
 schedule+0x55/0xc0 kernel/sched/core.c:6837
 exit_to_user_mode_loop kernel/entry/common.c:102 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x9f/0x130 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff8881040459c0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 12742 Comm: syz-executor.1 Not tainted 6.9.0-syzkaller-10713-g2a8120d7b482 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/23 05:33 upstream 2a8120d7b482 4d098039 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __change_pid / perf_event_switch_output
* Struck through repros no longer work on HEAD.