diff options
author | Thomas Richter <tmricht@linux.ibm.com> | 2025-03-19 15:28:20 +0300 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2025-03-20 03:00:16 +0300 |
commit | 431db90a7303cb394c5a881b4479946f64052727 (patch) | |
tree | 91787d85ccc84bcd2b313796261a5b462db5d176 /tools/perf/scripts/python/task-analyzer.py | |
parent | 6d2dcd635204c023eb5328ad7d38b198a5558c9b (diff) | |
download | linux-431db90a7303cb394c5a881b4479946f64052727.tar.xz |
perf pmu: Handle memory failure in tool_pmu__new()
On linux-next
commit 72c6f57a4193 ("perf pmu: Dynamically allocate tool PMU")
allocated PMU named "tool" dynamicly. However that allocation
can fail and a NULL pointer is returned. That case is currently
not handled and would result in an invalid address reference.
Add a check for NULL pointer.
Fixes: 72c6f57a4193 ("perf pmu: Dynamically allocate tool PMU")
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Link: https://lore.kernel.org/r/20250319122820.2898333-1-tmricht@linux.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions