Re: [PATCH v8 01/22] RISC-V: perf: fix resource cleanup on driver probe failure

From: Charlie Jenkins

Date: Mon Jul 20 2026 - 03:25:22 EST


On Wed, 01 Jul 2026 01:46:49 -0700, Atish Patra <atish.patra@xxxxxxxxx> wrote:
> Sashiko pointed out various UAF and memory leak issues around
> pmu_sbi_device_probe() error paths.
>
> If the probe fails, here are list of cleanups needed.
> a. Already registered pmu must be freed
> b. per cpu IRQ must be released
> c. pmu_ctr_list data structure must be freed
> d. cpu hotplug state must be cleaned up only if added.
>
> [...]

Reviewed-by: Charlie Jenkins <thecharlesjenkins@xxxxxxxxx>

--
- Charlie