[moderation] [perf?] KCSAN: data-race in __perf_event_read_value / perf_event_set_state (6)

0 views
Skip to first unread message

syzbot

unread,
10:33 AM (9 hours ago) 10:33 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: ac3fd01e4c1e Linux 6.18-rc7
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12dd78b4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=655255e3ef31c19b
dashboard link: https://syzkaller.appspot.com/bug?extid=0db71d7151921b59c16a
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
CC: [ac...@kernel.org adrian...@intel.com alexander...@linux.intel.com iro...@google.com james...@linaro.org jo...@kernel.org linux-...@vger.kernel.org linux-pe...@vger.kernel.org mark.r...@arm.com mi...@redhat.com namh...@kernel.org pet...@infradead.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0b87e3335067/disk-ac3fd01e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5d86405bc71d/vmlinux-ac3fd01e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5cdf269de51b/bzImage-ac3fd01e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0db71d...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __perf_event_read_value / perf_event_set_state

write to 0xffff88813702db30 of 8 bytes by task 11145 on cpu 1:
__perf_update_times kernel/events/core.c:-1 [inline]
perf_event_update_time kernel/events/core.c:734 [inline]
perf_event_set_state+0x195/0x440 kernel/events/core.c:753
event_sched_out+0x2d4/0x4d0 kernel/events/core.c:2393
group_sched_out kernel/events/core.c:2417 [inline]
__pmu_ctx_sched_out+0x3e7/0x530 kernel/events/core.c:3460
ctx_sched_out+0x273/0x2d0 kernel/events/core.c:3541
task_ctx_sched_out+0x4d/0x70 kernel/events/core.c:2861
perf_event_context_sched_out kernel/events/core.c:3748 [inline]
__perf_event_task_sched_out+0x286/0x370 kernel/events/core.c:3848
perf_event_task_sched_out include/linux/perf_event.h:1654 [inline]
prepare_task_switch kernel/sched/core.c:5123 [inline]
context_switch kernel/sched/core.c:5272 [inline]
__schedule+0xaf8/0xb30 kernel/sched/core.c:6929
__schedule_loop kernel/sched/core.c:7011 [inline]
schedule+0x5f/0xd0 kernel/sched/core.c:7026
exit_to_user_mode_loop+0x51/0x110 kernel/entry/common.c:31
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88813702db30 of 8 bytes by task 11151 on cpu 0:
__perf_event_read_value+0x82/0x1d0 kernel/events/core.c:5893
perf_read_one kernel/events/core.c:6050 [inline]
__perf_read kernel/events/core.c:6103 [inline]
perf_read+0x173/0x4d0 kernel/events/core.c:6120
loop_rw_iter+0x2c6/0x3f0 include/linux/uio.h:-1
io_iter_do_read io_uring/rw.c:839 [inline]
__io_read+0xbd5/0xc30 io_uring/rw.c:954
io_read+0x4a/0x190 io_uring/rw.c:1034
__io_issue_sqe+0xfe/0x2e0 io_uring/io_uring.c:1824
io_issue_sqe+0x56/0xa80 io_uring/io_uring.c:1847
io_wq_submit_work+0x3f7/0x5f0 io_uring/io_uring.c:1959
io_worker_handle_work+0x44e/0x9b0 io_uring/io-wq.c:650
io_wq_worker+0x22e/0x860 io_uring/io-wq.c:704
ret_from_fork+0x122/0x1b0 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

value changed: 0x00000000016f71b2 -> 0x00000000016fef51

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 11151 Comm: iou-wrk-11145 Tainted: G W syzkaller #0 PREEMPT(voluntary)
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages