git: 486ef221b935 - main - hwpstate_intel(4): Fix uninitialized variable in debug dump sysctl
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Jun 2026 13:39:06 UTC
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))