diff options
author | Nicholas Mc Guire <hofrat@osadl.org> | 2018-11-28 14:24:47 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-11-29 19:29:16 +0300 |
commit | 754a58db6a556e6e5f5e32f3e84e7d67b5bf9c8e (patch) | |
tree | d0fec4664c90dde565d35b00e69788ce796e6360 /Documentation/perf | |
parent | cbb72a3c19eff0ea3ccb0b068eca189063c86174 (diff) | |
download | linux-754a58db6a556e6e5f5e32f3e84e7d67b5bf9c8e.tar.xz |
perf: arm_spe: handle devm_kasprintf() failure
devm_kasprintf() may return NULL on failure of internal allocation
thus the assignment to 'name' is not safe if unchecked. If NULL
is passed in for name then perf_pmu_register() would not fail
but rather silently jump to skip_type which is not the intent
here. As perf_pmu_register() may also return -ENOMEM returning
-ENOMEM in the (unlikely) failure case of devm_kasprintf() should
be fine here as well.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Fixes: d5d9696b0380 ("drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension")
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
[will: reworded error message]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'Documentation/perf')
0 files changed, 0 insertions, 0 deletions