Re: [PATCH] spi: fix use-after-free on managed registration failure
From: Mark Brown
Date: Thu Mar 26 2026 - 15:25:35 EST
On Thu, Mar 26, 2026 at 09:19:22PM +0200, Andy Shevchenko wrote:
> On Thu, Mar 26, 2026 at 11:35:56AM +0200, Andy Shevchenko wrote:
> > On Wed, Mar 25, 2026 at 03:53:19PM +0100, Johan Hovold wrote:
> > > The SPI API is asymmetric and the controller is freed as part of
> > > deregistration (unless it has been allocated using
> > > devm_spi_alloc_host/target()).
...
> > > An alternative would be a partial revert of the offending commit, but
> > > it is better to handle this explicitly until the API has been fixed
> > > (e.g. see 5e844cc37a5c ("spi: Introduce device-managed SPI controller
> > > allocation")).
> > Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Seems Mark dropped the original change, so this is not needed.
Not intentionally?
Attachment:
signature.asc
Description: PGP signature