[PATCH 0/8] spi: fix explicit controller deregistration
From: Johan Hovold
Date: Tue Apr 14 2026 - 09:47:25 EST
Turns out we have a few drivers that get the tear down ordering wrong
also when not using device managed registration (cf. [1] and [2]).
Fix this to avoid issues like system errors due to unclocked accesses,
NULL-pointer dereferences, hangs or failed I/O during during
deregistration (e.g. when powering down devices).
Johan
[1] https://lore.kernel.org/lkml/20260409120419.388546-2-johan@xxxxxxxxxx/
[2] https://lore.kernel.org/lkml/20260410081757.503099-1-johan@xxxxxxxxxx/
Johan Hovold (8):
spi: cadence: fix controller deregistration
spi: cadence-quadspi: fix controller deregistration
spi: mpc52xx: fix controller deregistration
spi: mpc52xx: fix use-after-free on unbind
spi: mxic: fix controller deregistration
spi: orion: fix controller deregistration
spi: topcliff-pch: fix controller deregistration
spi: topcliff-pch: fix use-after-free on unbind
drivers/spi/spi-cadence-quadspi.c | 4 ++--
drivers/spi/spi-cadence.c | 6 +++++-
drivers/spi/spi-mpc52xx.c | 6 ++++--
drivers/spi/spi-mxic.c | 3 ++-
drivers/spi/spi-orion.c | 7 ++++++-
drivers/spi/spi-topcliff-pch.c | 11 ++++++++---
6 files changed, 27 insertions(+), 10 deletions(-)
--
2.52.0