Lukas Wunner
53a9502d9a
spi: bcm2835aux: Fix use-after-free on unbind
...
commit e13ee6cc4781edaf8c7321bee19217e3702ed481 upstream.
bcm2835aux_spi_remove() accesses the driver's private data after calling
spi_unregister_master() even though that function releases the last
reference on the spi_master and thereby frees the private data.
Fix by switching over to the new devm_spi_alloc_master() helper which
keeps the private data accessible until the driver has unbound.
Fixes: b9dd3f6d4172 ("spi: bcm2835aux: Fix controller unregister order")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Cc: <stable@vger.kernel.org> # v4.4+: 123456789abc: spi: Introduce device-managed SPI controller allocation
Cc: <stable@vger.kernel.org> # v4.4+: b9dd3f6d4172: spi: bcm2835aux: Fix controller unregister order
Cc: <stable@vger.kernel.org> # v4.4+
Link: https://lore.kernel.org/r/b290b06357d0c0bdee9cecc539b840a90630f101.1605121038.git.lukas@wunner.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-24 13:29:22 +01:00
..
atmel-quadspi.c
internals.h
Kconfig
spi: Prevent adding devices below an unregistering controller
2020-08-26 10:40:50 +02:00
Makefile
spi-altera.c
spi-armada-3700.c
spi-at91-usart.c
spi-ath79.c
spi-atmel.c
spi-au1550.c
spi-axi-spi-engine.c
spi-bcm-qspi.c
spi: bcm-qspi: when tx/rx buffer is NULL set to 0
2020-06-17 16:40:30 +02:00
spi-bcm-qspi.h
spi-bcm63xx-hsspi.c
spi-bcm63xx.c
spi-bcm2835.c
spi: bcm2835: remove use of uninitialized gpio flags variable
2020-11-18 19:20:25 +01:00
spi-bcm2835aux.c
spi: bcm2835aux: Fix use-after-free on unbind
2020-11-24 13:29:22 +01:00
spi-bitbang-txrx.h
spi-bitbang.c
spi-brcmstb-qspi.c
spi-butterfly.c
spi-cadence.c
spi-cavium-octeon.c
spi-cavium-thunderx.c
spi-cavium.c
spi-cavium.h
spi-clps711x.c
spi-coldfire-qspi.c
spi-davinci.c
spi-dln2.c
spi-dw-mid.c
spi: dw: Return any value retrieved from the dma_transfer callback
2020-06-22 09:31:10 +02:00
spi-dw-mmio.c
spi-dw-pci.c
spi-dw.c
spi: dw: Return any value retrieved from the dma_transfer callback
2020-06-22 09:31:10 +02:00
spi-dw.h
spi-efm32.c
spi-ep93xx.c
spi-falcon.c
spi-fsl-cpm.c
spi-fsl-cpm.h
spi-fsl-dspi.c
spi: spi-fsl-dspi: Fix lockup if device is shutdown during SPI transfer
2020-07-22 09:32:55 +02:00
spi-fsl-espi.c
spi: fsl-espi: Only process interrupts for expected events
2020-10-07 08:01:27 +02:00
spi-fsl-lib.c
spi-fsl-lib.h
spi-fsl-lpspi.c
spi: lpspi: Fix use-after-free on unbind
2020-11-24 13:29:21 +01:00
spi-fsl-qspi.c
spi-fsl-spi.c
spi-fsl-spi.h
spi-geni-qcom.c
spi-gpio.c
spi-img-spfi.c
spi-imx.c
spi-iproc-qspi.c
spi-jcore.c
spi-lantiq-ssc.c
spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM
2020-08-19 08:16:14 +02:00
spi-lm70llp.c
spi-loopback-test.c
spi: spi-loopback-test: Fix out-of-bounds read
2020-09-23 12:40:35 +02:00
spi-lp8841-rtc.c
spi-mem.c
spi: spi-mem: Fix Dual/Quad modes on Octal-capable devices
2020-06-22 09:30:50 +02:00
spi-meson-spicc.c
spi-meson-spifc.c
spi-mpc52xx-psc.c
spi-mpc52xx.c
spi-mpc512x-psc.c
spi-mt65xx.c
spi: mediatek: use correct SPI_CFG2_REG MACRO
2020-07-29 10:18:37 +02:00
spi-mt7621.c
spi-mxic.c
spi-mxs.c
spi-npcm-fiu.c
spi: npcm-fiu: Don't leak SPI master in probe error path
2020-11-24 13:29:22 +01:00
spi-npcm-pspi.c
spi-nxp-fspi.c
spi-oc-tiny.c
spi-omap-100k.c
spi-omap-uwire.c
spi-omap2-mcspi.c
spi: omap2-mcspi: Improve performance waiting for CHSTAT
2020-10-29 09:57:41 +01:00
spi-orion.c
spi-pic32-sqi.c
spi-pic32.c
spi-pl022.c
spi-ppc4xx.c
spi-pxa2xx-dma.c
spi-pxa2xx-pci.c
spi-pxa2xx.c
spi: pxa2xx: Apply CS clk quirk to BXT
2020-06-22 09:30:51 +02:00
spi-pxa2xx.h
spi-qcom-qspi.c
spi-qup.c
spi-rb4xx.c
spi-rockchip.c
spi: rockchip: Fix error in SPI slave pio read
2020-08-19 08:15:58 +02:00
spi-rspi.c
spi-s3c24xx-fiq.h
spi-s3c24xx-fiq.S
spi-s3c24xx.c
spi-s3c64xx.c
spi: spi-s3c64xx: Check return values
2020-10-29 09:57:34 +01:00
spi-sc18is602.c
spi-sh-hspi.c
spi-sh-msiof.c
spi-sh-sci.c
spi-sh.c
spi-sifive.c
spi-sirf.c
spi-slave-mt27xx.c
spi-slave-system-control.c
spi-slave-time.c
spi-sprd-adi.c
spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH
2020-07-22 09:33:18 +02:00
spi-sprd.c
spi: sprd: Release DMA channel also on probe deferral
2020-11-05 11:43:23 +01:00
spi-st-ssc4.c
spi-stm32-qspi.c
spi-stm32.c
spi: stm32: fix pm_runtime_get_sync() error checking
2020-09-17 13:47:44 +02:00
spi-sun4i.c
spi-sun6i.c
spi: spi-sun6i: sun6i_spi_transfer_one(): fix setting of clock rate
2020-07-22 09:33:02 +02:00
spi-synquacer.c
spi-tegra20-sflash.c
spi-tegra20-slink.c
spi-tegra114.c
spi-test.h
spi-ti-qspi.c
spi-tle62x0.c
spi-topcliff-pch.c
spi-txx9.c
spi-uniphier.c
spi-xcomm.c
spi-xilinx.c
spi-xlp.c
spi-xtensa-xtfpga.c
spi-zynq-qspi.c
spi-zynqmp-gqspi.c
spi.c
spi: Introduce device-managed SPI controller allocation
2020-11-24 13:29:22 +01:00
spidev.c
spi: spidev: Align buffers for DMA
2020-08-19 08:16:25 +02:00