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

From: Johan Hovold

Date: Wed Apr 22 2026 - 11:46:16 EST


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 issue was flagged by Sashiko when reviewing a controller
> deregistration fix.
>
> Fixes: 42bbb70980f3 ("powerpc/5200: Add mpc5200-spi (non-PSC) device driver")
> Cc: stable@xxxxxxxxxxxxxxx # 2.6.33
> Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
> Link: https://sashiko.dev/#/patchset/20260414134319.978196-1-johan%40kernel.org?part=3
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
> ---

This one will need another spin to address some further pre-existing
issues flagged by Sashiko.

Johan