kernel_samsung_a53x/include/linux/spi
Mark Brown 9f69ce235f spi: Fix deadlock when adding SPI controllers on SPI buses
commit 6098475d4cb48d821bdf453c61118c56e26294f0 upstream.

Currently we have a global spi_add_lock which we take when adding new
devices so that we can check that we're not trying to reuse a chip
select that's already controlled.  This means that if the SPI device is
itself a SPI controller and triggers the instantiation of further SPI
devices we trigger a deadlock as we try to register and instantiate
those devices while in the process of doing so for the parent controller
and hence already holding the global spi_add_lock.  Since we only care
about concurrency within a single SPI bus move the lock to be per
controller, avoiding the deadlock.

This can be easily triggered in the case of spi-mux.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Hardik Gohil <hgohil@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:25 +01:00
..
ad7877.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ads7846.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at73c213.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at86rf230.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cc2520.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
corgi_lcd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ds1305.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eeprom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flash.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx_modem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libertas_spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lms283gf05.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max7301.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mc33880.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmc_spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa2xx_spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rspi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c24xx-fiq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s3c24xx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh_hspi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh_msiof.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spi-fsl-dspi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spi-mem.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spi.h spi: Fix deadlock when adding SPI controllers on SPI buses 2024-11-30 02:33:25 +01:00
spi_bitbang.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spi_gpio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spi_oc_tiny.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tdo24m.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tle62x0.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00