syzbot


KCSAN: data-race in _free_event / perf_pending_task

Status: auto-obsoleted due to no activity on 2024/10/04 07:47
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+ef3b1bb7dd78b4e9109c@syzkaller.appspotmail.com
First crash: 125d, last: 95d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly perf report (Sep 2024) 0 (1) 2024/09/02 08:23
[syzbot] [perf?] KCSAN: data-race in _free_event / perf_pending_task 0 (1) 2024/07/31 12:08
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in _free_event / perf_pending_task (2) perf 5 25d 50d 0/28 upstream: reported on 2024/10/14 06:09

Sample crash report:
==================================================================
BUG: KCSAN: data-race in _free_event / perf_pending_task

write to 0xffff88811587a640 of 4 bytes by task 1739 on cpu 1:
 perf_pending_task+0xe8/0x220 kernel/events/core.c:6869
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [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+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811587a640 of 4 bytes by task 1738 on cpu 0:
 perf_pending_task_sync kernel/events/core.c:5216 [inline]
 _free_event+0xcf/0xa10 kernel/events/core.c:5223
 put_event kernel/events/core.c:5351 [inline]
 perf_event_release_kernel+0x61a/0x670 kernel/events/core.c:5476
 perf_release+0x25/0x30 kernel/events/core.c:5486
 __fput+0x192/0x6f0 fs/file_table.c:422
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [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+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x7bef85df -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 1738 Comm: syz.0.7818 Not tainted 6.11.0-rc5-syzkaller-00176-g20371ba12063 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/30 07:46 upstream 20371ba12063 ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _free_event / perf_pending_task
2024/08/30 07:40 upstream 20371ba12063 ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _free_event / perf_pending_task
2024/08/23 22:12 upstream 3d5f968a177d d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _free_event / perf_pending_task
2024/08/17 21:03 upstream e5fa841af679 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _free_event / perf_pending_task
2024/08/12 17:56 upstream 7c626ce4bae1 842184b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _free_event / perf_pending_task
2024/07/30 18:28 upstream 94ede2a3e913 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in _free_event / perf_pending_task
* Struck through repros no longer work on HEAD.