Re: [PATCH v2] perf pmu: Handle memory failure in tool_pmu__new()

From: Namhyung Kim
Date: Thu Mar 20 2025 - 12:02:24 EST


On Wed, 19 Mar 2025 13:28:20 +0100, Thomas Richter wrote:
> 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.
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung