From: Palmer Cox Date: Tue, 27 Nov 2012 12:17:46 +0000 (+0100) Subject: cpupower tools: Fix malloc of cpu_info structure X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~88^2~7^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35a169737cdf9155e890d60eae2b8fffc16d16ba;p=pandora-kernel.git cpupower tools: Fix malloc of cpu_info structure The cpu_info member of cpupower_topology was being declared as an unnamed structure. This member was then being malloced using the size of the parent cpupower_topology * the number of cpus. This works because cpu_info is smaller than cpupower_topology. However, there is no guarantee that will always be the case. Making cpu_info its own top level structure (named cpuid_core_info) allows for mallocing the actual size of this structure. This also lets us get rid of a redefinition of the structure in topology.c with slightly different field names. Signed-off-by: Palmer Cox Signed-off-by: Thomas Renninger Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed