Re: [PATCH] spi: fix controller reference leak in acpi_spi_device_alloc()
From: Mark Brown
Date: Thu Sep 17 2026 - 20:08:04 EST
On Thu, Sep 17, 2026 at 03:48:26PM +0000, Wentao Liang wrote:
> acpi_spi_add_resource() stores the controller returned by
> acpi_spi_find_controller_by_adev() in lookup->ctlr. That lookup takes a
> reference via class_find_device(), which acpi_spi_device_alloc() never
> releases, leaking it on the error paths and on the success path too,
> where spi_alloc_device() takes its own reference. Drop the lookup
> reference when the caller did not pass a controller.
This doesn't apply against current code, please check and resend.
Attachment:
signature.asc
Description: PGP signature