Re: [PATCH] spi: mpc52xx: fix use-after-free on registration failure
From: Johan Hovold
Date: Thu Apr 23 2026 - 04:04:12 EST
On Wed, Apr 22, 2026 at 06:12:58PM +0100, Mark Brown wrote:
> On Wed, Apr 22, 2026 at 05:41:32PM +0200, Johan Hovold wrote:
> > On Tue, Apr 21, 2026 at 02:58:00PM +0200, Johan Hovold wrote:
> > > Make sure to disable and free the interrupts in case controller
> > > registration fails to avoid a potential use-after-free and resource
> > > leak.
>
> > This one will need another spin to address some further pre-existing
> > issues flagged by Sashiko.
>
> Please do an incremental change, it's already in CI with some merges on
> top of it.
False alarm. Sashiko flagged the freeing of interrupt zero as triggering
a warning, but that should only be the case on x86.
I've sent a clean up patch for this here:
https://lore.kernel.org/r/20260423075801.2252318-1-johan@xxxxxxxxxx
Johan
Attachment:
signature.asc
Description: PGP signature