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

Paul Walmsley <[email protected]>
Newsgroups org.kernel.vger.linux-devicetree,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel,org.kernel.vger.linux-perf-users
Message-ID <[email protected]>
On Wed, 1 Jul 2026, Atish Patra wrote:

> From: Atish Patra <[email protected]>
> 
> 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.
> 
> Fix the resource cleanup by reorganizing the code around probe failure.
> 
> Reported-by: Sashiko AI <[email protected]>
> Signed-off-by: Atish Patra <[email protected]>

Thanks, queued for v7.3.


- Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.