]> git.ipfire.org Git - thirdparty/linux.git/commit
perf/x86/intel/uncore: Guard against invalid box control address
authorZide Chen <zide.chen@intel.com>
Tue, 2 Jun 2026 14:49:03 +0000 (07:49 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 4 Jun 2026 09:38:36 +0000 (11:38 +0200)
commit3c19ea24f02658c4b8ad364458fae4d77fdb3fae
tree5599c5dbb00dcf144d2ca963cc28ef3af4c45783
parent63f48abd55d0417996bca86022925c853a2b436b
perf/x86/intel/uncore: Guard against invalid box control address

Theoretically, intel_uncore_find_discovery_unit() could return NULL,
e.g., when a CPU die is offline during uncore enumeration and its PMU
units are not added to the discovery RB-tree.

Guard against a NULL return value and the resulting invalid box control
address (0) before accessing hardware.

Signed-off-by: Zide Chen <zide.chen@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://patch.msgid.link/20260602144908.263680-3-zide.chen@intel.com
arch/x86/events/intel/uncore_discovery.c