From: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
To: "Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Vignesh R <vigneshr-l0cyMroinI0@public.gmane.org>,
Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
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 [thread overview]
Message-ID: <7hoaabsqmb.fsf@baylibre.com> (raw)
In-Reply-To: <1603558.KZbpLAQA15@diego> ("Heiko Stübner"'s message of "Fri, 18 Mar 2016 11:15:11 +0100")
Heiko Stübner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org> writes:
> 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: 49023d2e4ead ("spi: core: Fix deadlock when sending messages")
> Signed-off-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Tested on rk3288-veyron-jerry and verified that it fixes the boot
failure I reported.
Tested-by: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
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
prev parent reply other threads:[~2016-03-18 16:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 10:15 [PATCH v2] spi: fix possible deadlock between internal bus locks and bus_lock_flag Heiko Stübner
2016-03-18 10:40 ` Jon Hunter
2016-03-18 10:40 ` Jon Hunter
2016-03-18 10:58 ` Applied "spi: fix possible deadlock between internal bus locks and bus_lock_flag" to the spi tree Mark Brown
2016-03-18 16:22 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7hoaabsqmb.fsf@baylibre.com \
--to=khilman-rdvid1duhrbwk0htik3j/w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=vigneshr-l0cyMroinI0@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.