diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2023-01-12 23:01:02 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-01-21 02:06:12 +0300 |
commit | 3af548f2361077cd53762c88d62343d4e8ea1efb (patch) | |
tree | e1769d93026baa1027fb893711c7f04a0090baee /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | dbf061b26221fa1a99e6489dd61f5b4ee97a24e8 (diff) | |
download | linux-3af548f2361077cd53762c88d62343d4e8ea1efb.tar.xz |
perf/x86/uncore: Fix potential NULL pointer in uncore_get_alias_name
The current code assumes that the discovery table provides valid
box_ids for the normal units. It's not the case anymore since some units
in the discovery table are broken on some SPR variants.
Factor out uncore_get_box_id(). Check the existence of the type->box_ids
before using it. If it's not available, use pmu_idx.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Petlan <mpetlan@redhat.com>
Link: https://lore.kernel.org/r/20230112200105.733466-3-kan.liang@linux.intel.com
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions