diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff57fdab7..2148ee511a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,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 ff0551cbef..92fb63cf61 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); }