[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aSSB0foqqbOl3fC3@willie-the-truck>
Date: Mon, 24 Nov 2025 16:03:29 +0000
From: Will Deacon <will@...nel.org>
To: Johan Hovold <johan@...nel.org>
Cc: Mark Rutland <mark.rutland@....com>,
linux-arm-kernel@...ts.infradead.org,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org, Besar Wicaksono <bwicaksono@...dia.com>
Subject: Re: [PATCH] perf/arm_cspmu: fix device leaks on module unload
On Fri, Nov 21, 2025 at 12:52:13PM +0100, Johan Hovold wrote:
> Make sure to drop the references taken when looking up the backend
> devices during vendor module unload.
>
> Fixes: bfc653aa89cb ("perf: arm_cspmu: Separate Arm and vendor module")
> Cc: stable@...r.kernel.org # 6.7
> Cc: Besar Wicaksono <bwicaksono@...dia.com>
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
> drivers/perf/arm_cspmu/arm_cspmu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
> index efa9b229e701..e0d4293f06f9 100644
> --- a/drivers/perf/arm_cspmu/arm_cspmu.c
> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c
> @@ -1365,8 +1365,10 @@ void arm_cspmu_impl_unregister(const struct arm_cspmu_impl_match *impl_match)
>
> /* Unbind the driver from all matching backend devices. */
> while ((dev = driver_find_device(&arm_cspmu_driver.driver, NULL,
> - match, arm_cspmu_match_device)))
> + match, arm_cspmu_match_device))) {
> device_release_driver(dev);
> + put_device(dev);
> + }
There's already a fix queued for this; please take a look:
https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/commit/?h=for-next/perf&id=970e1e41805f0bd49dc234330a9390f4708d097d
Wil
Powered by blists - more mailing lists