From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH v2] spi: fix possible deadlock between internal bus locks and bus_lock_flag Date: Fri, 18 Mar 2016 09:22:20 -0700 Message-ID: <7hoaabsqmb.fsf@baylibre.com> References: <1603558.KZbpLAQA15@diego> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1603558.KZbpLAQA15@diego> ("Heiko =?utf-8?Q?St=C3=BCbner=22'?= =?utf-8?Q?s?= message of "Fri, 18 Mar 2016 11:15:11 +0100") Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Heiko =?utf-8?Q?St=C3=BCbner?= Cc: Mark Brown , Vignesh R , Jon Hunter , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rockchip.vger.kernel.org Heiko St=C3=BCbner writes: > External users may use spi_bus_lock to get exclusive access. This wil= l > also grab the bus_lock_mutex and may therefore result in a deadlock i= f > __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: 49023d2e4ead ("spi: core: Fix deadlock when sending messages") > Signed-off-by: Heiko Stuebner Tested on rk3288-veyron-jerry and verified that it fixes the boot failure I reported. Tested-by: Kevin Hilman Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html