Re: [PATCH 1/5] spi: imx: fix use-after-free on unbind
From: Johan Hovold
Date: Mon Mar 23 2026 - 11:58:54 EST
On Mon, Mar 23, 2026 at 03:47:45PM +0100, Marc Kleine-Budde wrote:
> On 23.03.2026 14:59:49, Johan Hovold wrote:
> > Indeed, it's a known issue with the SPI API. See for example:
> >
> > 68b892f1fdc4 ("spi: document odd controller reference handling")
> > 5e844cc37a5c ("spi: Introduce device-managed SPI controller allocation")
> > f0c35a024cce ("spi: fix misleading controller deregistration kernel-doc")
This was supposed to say
3f174274d224 ("spi: fix misleading controller deregistration kernel-doc")
> > > Would using devm_spi_alloc_host() be an option here?
> >
> > It can also be used, but that's more intrusive so I did that as a
> > follow-on cleanup to the fix (see patch 2/5).
>
> Ah, nice! At the time I replied to the patch, the whole series was not
> available on lore, yet.
Sorry, I should have CC:ed you the whole series.
> Acked-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
>
> And thanks for taking the time in explaining me the details :)
No worries. :)
Johan
Attachment:
signature.asc
Description: PGP signature