summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorKristen Carlson Accardi <kristen.c.accardi@intel.com>2026-09-24 12:36:25 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-10-13 12:03:37 +0300
commit4a8ad9828aa4a4bd4324c5b7b2d818f71bf34a9e (patch)
treec39bdb81c9d40e78adf40423e5d1bb91965cc95a /tools/perf/scripts/python/export-to-sqlite.py
parente7aa0a21a38afd3063fd9b4bf31025a882537d95 (diff)
platform/x86/intel: power-domains: Handle failed init in tpmi_get_power_domain_mask()
tpmi_init() returns early on CPU models that are not in tpmi_cpu_ids, before tpmi_power_domain_mask is allocated. When the driver is built in, the exported tpmi_get_power_domain_mask() remains callable after the failed init. It returns NULL then only because it indexes the NULL array at offset 0 for the zeroed per-CPU data. If cpuhp_setup_state() fails, the error path frees the array but leaves the pointer set, so the helper would return a pointer into freed memory. Nothing in the tree calls tpmi_get_power_domain_mask() today, so this is hardening rather than a fix for a reachable bug. Return NULL when the array was not allocated, and clear the pointer wherever it is freed, as the previous patch does for domain_die_map. Assisted-by: LLM Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20260924193625.1830526-3-kristen.c.accardi@intel.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions