]> git.ipfire.org Git - thirdparty/linux.git/commit
perf arm_spe: Handle missing CPU IDs
authorJames Clark <james.clark@linaro.org>
Tue, 14 Apr 2026 12:48:00 +0000 (13:48 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 May 2026 01:03:05 +0000 (22:03 -0300)
commit0c7e4d11fb8d490c8f64ea98d05e441c9e26c6ee
treee8d2602963f3905ba6d71ad47461dea1c0321db8
parent8e32bd775cc882ea591c75cac9e7d9c4ad68f7c6
perf arm_spe: Handle missing CPU IDs

Don't call strtol() with a null pointer to avoid undefined behavior.

I'm not sure of the exact scenario for missing CPU IDs but I don't think
it happens in practice. SPE decoding can continue without them with
reduced functionality, but print an error message anyway.

Reviewed-by: Leo Yan <leo.yan@arm.com>
Signed-off-by: James Clark <james.clark@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/arm-spe.c