[moderation] [perf?] KCSAN: data-race in perf_event_set_state / perf_event_update_time (5)

0 views
Skip to first unread message

syzbot

unread,
Sep 9, 2025, 7:09:26 AM (4 days ago) Sep 9
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f777d1112ee5 Merge tag 'vfs-6.17-rc6.fixes' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15a1ad62580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6e0c213d0735f5dd
dashboard link: https://syzkaller.appspot.com/bug?extid=81af9f53b00b88f71d07
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 jo...@kernel.org kan....@linux.intel.com 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/fed19023373f/disk-f777d111.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/659d13ddd141/vmlinux-f777d111.xz
kernel image: https://storage.googleapis.com/syzbot-assets/301353f3ac69/bzImage-f777d111.xz

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

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

write to 0xffff888118f02878 of 8 bytes by task 13512 on cpu 0:
perf_event_update_time+0x196/0x1d0 kernel/events/core.c:736
perf_mmap+0xa4e/0xc60 kernel/events/core.c:7129
vfs_mmap include/linux/fs.h:2290 [inline]
mmap_file mm/internal.h:167 [inline]
__mmap_new_file_vma mm/vma.c:2413 [inline]
__mmap_new_vma mm/vma.c:2476 [inline]
__mmap_region mm/vma.c:2669 [inline]
mmap_region+0xfad/0x1630 mm/vma.c:2739
do_mmap+0x9b3/0xbe0 mm/mmap.c:558
vm_mmap_pgoff+0x17a/0x2e0 mm/util.c:580
ksys_mmap_pgoff+0x268/0x310 mm/mmap.c:604
x64_sys_call+0x14a3/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:10
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888118f02878 of 8 bytes by task 13511 on cpu 1:
__perf_update_times kernel/events/core.c:719 [inline]
perf_event_update_time kernel/events/core.c:734 [inline]
perf_event_set_state+0x153/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+0x263/0x530 kernel/events/core.c:3453
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:5155 [inline]
context_switch kernel/sched/core.c:5304 [inline]
__schedule+0xaf8/0xb30 kernel/sched/core.c:6961
__schedule_loop kernel/sched/core.c:7043 [inline]
schedule+0x5f/0xd0 kernel/sched/core.c:7058
schedule_preempt_disabled+0x10/0x20 kernel/sched/core.c:7115
rwsem_down_write_slowpath+0x410/0x910 kernel/locking/rwsem.c:1185
__down_write_common kernel/locking/rwsem.c:1317 [inline]
__down_write_killable kernel/locking/rwsem.c:1331 [inline]
down_write_killable+0x4d/0x80 kernel/locking/rwsem.c:1603
mmap_write_lock_killable include/linux/mmap_lock.h:415 [inline]
vm_mmap_pgoff+0xe3/0x2e0 mm/util.c:578
ksys_mmap_pgoff+0x268/0x310 mm/mmap.c:604
x64_sys_call+0x14a3/0x2ff0 arch/x86/include/generated/asm/syscalls_64.h:10
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000000f72b7 -> 0x000000000011fc90

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 13511 Comm: syz.9.3381 Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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