Skip to content

spi: imx: fix use-after-free on unbind

Johan Hovold linux-spi lkml stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 1 replyIn review
  2. v15 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- add stable tag to rockchip fix
- move rockchip fix before the cleanups

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5spi: imx: fix use-after-free on unbinddrivers/spi/spi-imx.c+4 -00 replies
2/5spi: rockchip: fix controller deregistrationdrivers/spi/spi-rockchip.c+3 -10 replies
3/5spi: imx: switch to managed controller allocationdrivers/spi/spi-imx.c+14 -310 replies
4/5spi: tegra20-slink: switch to managed controller allocationdrivers/spi/spi-tegra20-slink.c+10 -160 replies
5/5spi: rockchip: switch to managed controller allocationdrivers/spi/spi-rockchip.c+13 -230 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchMarc Kleine-Budde
1/5A-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/5] spi: imx: fix use-after-free on unbind

The SPI subsystem frees the controller and any subsystem allocated driver data as part of deregistration (unless the allocation is device managed).

This series fixes the IMX driver that got this wrong and then converts it to use device managed allocation.

Included are also a (preparatory) deregistration fix for the rockchip driver and related cleanups for the tegre20-slink and rockchip drivers that both take a controller reference during unbind.

Johan

Changes in v2
- add stable tag to rockchip fix
- move rockchip fix before the cleanups

Johan Hovold (5):
spi: imx: fix use-after-free on unbind
spi: rockchip: fix controller deregistration
spi: imx: switch to managed controller allocation
spi: tegra20-slink: switch to managed controller allocation
spi: rockchip: switch to managed controller allocation

 drivers/spi/spi-imx.c           | 41 +++++++++++----------------------
 drivers/spi/spi-rockchip.c      | 40 +++++++++++++-------------------
 drivers/spi/spi-tegra20-slink.c | 26 ++++++++-------------
 3 files changed, 40 insertions(+), 67 deletions(-)
Signature · 1 line
2.52.0