]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
cpufreq: don't leave stale statistics pointer
authorJan Beulich <jbeulich@suse.com>
Wed, 30 Apr 2025 06:47:49 +0000 (08:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 30 Apr 2025 06:47:49 +0000 (08:47 +0200)
commita1ce987411f61dbf5fe64bba0cd3d36d7cc0311f
tree788fcfc65f7de29f3ce52093de809b4654087535
parentc6e0a55396233bd7de6646a9b9be8d7c59950648
cpufreq: don't leave stale statistics pointer

Error paths of cpufreq_statistic_init() correctly free the base
structure pointer, but the per-CPU variable would still hold it, mis-
guiding e.g. cpufreq_statistic_update(). Defer installing of the pointer
there until the structure was fully populated.

Fixes: 755af07edba1 ("x86/cpufreq: don't use static array for large per-CPU data structures")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/cpufreq/utility.c