Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jun 2026 13:39:06 +0000
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 486ef221b935 - main - hwpstate_intel(4): Fix uninitialized variable in debug dump sysctl
Message-ID:  <6a3e80fa.47204.4beb9c6b@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=486ef221b9350644d6ad9a6ad93603d93cef6712

commit 486ef221b9350644d6ad9a6ad93603d93cef6712
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-06-25 14:13:56 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-06-26 13:37:45 +0000

    hwpstate_intel(4): Fix uninitialized variable in debug dump sysctl
    
    It can cause a "cannot read MSR" error to be reported although reading
    actually worked.
    
    Fixes:          29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind")
    Event:          Halifax Hackathon 202606
    Location:       jrm@'s living room
    Sponsored by:   The FreeBSD Foundation
---
 sys/x86/cpufreq/hwpstate_intel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c
index a903ae1521a6..844bebfc7274 100644
--- a/sys/x86/cpufreq/hwpstate_intel.c
+++ b/sys/x86/cpufreq/hwpstate_intel.c
@@ -155,6 +155,8 @@ dump_cppc_request_cb(void *args)
 {
 	struct dump_cppc_request_cb *const data = args;
 
+	data->err = 0;
+
 	if (rdmsr_safe(MSR_IA32_PM_ENABLE, &data->enabled))
 		data->err |= HWP_ERROR_CPPC_ENABLE;
 	if (rdmsr_safe(MSR_IA32_HWP_CAPABILITIES, &data->caps))


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3e80fa.47204.4beb9c6b>