Re: [PATCH] spi: fix use-after-free on managed registration failure

From: Andy Shevchenko

Date: Fri Mar 27 2026 - 03:26:30 EST


On Thu, Mar 26, 2026 at 07:25:14PM +0000, Mark Brown wrote:
> 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:

...

> > > > 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?

I don't know, but it allows to start from fixing the users to avoid regressions.
I'm fine with the current state of affairs.

--
With Best Regards,
Andy Shevchenko