Skip to content
Commit 24c8cd1b authored by Heiko Stübner's avatar Heiko Stübner Committed by Mark Brown
Browse files

spi: fix possible deadlock between internal bus locks and bus_lock_flag

External users may use spi_bus_lock to get exclusive access. This will
also grab the bus_lock_mutex and may therefore result in a deadlock if
__spi_pump_messages also tries to get the mutex.

Therefore adapt spi_pump_messages as well as spi_sync to preset the
bus_locked parameter according to the master->bus_lock_flag.

Fixes: 49023d2e

 ("spi: core: Fix deadlock when sending messages")
Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c508709b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment