From 216d3b24f32871da92c630e19d49c67d7b5ca7ef Mon Sep 17 00:00:00 2001 From: Pratik Kumar Dhakar Date: Fri, 20 Nov 2026 06:00:28 +0530 Subject: [PATCH] CPUCache (Linux): skips offline CPUs --- CHANGELOG.md | 1 + src/detection/cpucache/cpucache_linux.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d10bb3cd..4d13fcb3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Changes: Bugfixes: * Fixed libc version detection on FreeBSD without binutils installed, and on DragonFly BSD. (Libc, FreeBSD / DragonFly) +* Fixed CPU cache detection failing entirely when any CPU is offline. (#2736, CPUCache, Linux) # 2.71.0 diff --git a/src/detection/cpucache/cpucache_linux.c b/src/detection/cpucache/cpucache_linux.c index ff0551cbe..92fb63cf6 100644 --- a/src/detection/cpucache/cpucache_linux.c +++ b/src/detection/cpucache/cpucache_linux.c @@ -133,9 +133,10 @@ const char* ffDetectCPUCache(FFCPUCacheResult* result) { } ffStrbufAppendS(&path, pathCpuEntry->d_name); + // Skip a CPU whose cache can't be read, e.g. an offline one: the kernel removes its `cache/` const char* error = parseCpuCache(&path, result, &buffer, &added); if (error) { - return error; + FF_DEBUG("Skipping \"%s\": %s", pathCpuEntry->d_name, error); } ffStrbufSubstrBefore(&path, baseLen); }