kernel_samsung_a53x/include
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
..
acpi
asm-generic locking/rwlocks: Add contention detection for rwlocks 2024-11-19 17:44:08 +01:00
clocksource
crypto
drm Revert "drm/printer: Allow NULL data in devcoredump printer" 2024-11-24 00:23:06 +01:00
dt-bindings
keys
kunit
kvm
linux spi: Fix deadlock when adding SPI controllers on SPI buses 2024-11-30 02:33:25 +01:00
math-emu
media
memory
misc
net Revert "netfilter: nf_tables: use timestamp to check for set element timeout" 2024-11-24 00:23:55 +01:00
pcmcia
ras
rdma
scsc
scsi scsi: core: Fix a use-after-free 2024-11-19 14:19:51 +01:00
sdp
soc exynos-pm: fix build without CONFIG_SEC_PM_DEBUG 2024-11-19 17:39:21 +01:00
sound ALSA: dmaengine: Synchronize dma channel after drop() 2024-11-19 14:19:48 +01:00
target
test
trace Revert "kthread: add kthread_work tracepoints" 2024-11-24 00:23:23 +01:00
uapi Revert "netfilter: nf_tables: rise cap on SELinux secmark context" 2024-11-24 00:23:56 +01:00
variant1/linux
vdso
video
xen