From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org,
sbkim73@samsung.com, patches@opensource.wolfsonmicro.com,
lgirdwood@gmail.com
Subject: Re: [alsa-devel] [PATCH] ASoC: samsung: Use IRQ safe spin lock calls
Date: Fri, 19 Feb 2016 11:59:03 +0100 [thread overview]
Message-ID: <56C6F577.5050007@samsung.com> (raw)
In-Reply-To: <1455810433-10305-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>
On 18/02/16 16:47, Charles Keepax wrote:
> Lockdep warns of a potential lock inversion, i2s->lock is held numerous
> times whilst we are under the substream lock (snd_pcm_stream_lock). If
> we use the IRQ unsafe spin lock calls, you can also end up locking
> snd_pcm_stream_lock whilst under i2s->lock (if an IRQ happens whilst we
> are holding i2s->lock). This could result in deadlock.
>
> [ 18.147001] CPU0 CPU1
> [ 18.151509] ---- ----
> [ 18.156022] lock(&(&pri_dai->spinlock)->rlock);
> [ 18.160701] local_irq_disable();
> [ 18.166622] lock(&(&substream->self_group.lock)->rlock);
> [ 18.174595] lock(&(&pri_dai->spinlock)->rlock);
> [ 18.181806] <Interrupt>
> [ 18.184408] lock(&(&substream->self_group.lock)->rlock);
> [ 18.190045]
> [ 18.190045] *** DEADLOCK ***
>
> This patch changes to using the irq safe spinlock calls, to avoid this
> issue.
>
> Fixes: ce8bcdbb61d9 ("ASoC: samsung: i2s: Protect more registers with a spinlock")
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
prev parent reply other threads:[~2016-02-19 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 15:47 [PATCH] ASoC: samsung: Use IRQ safe spin lock calls Charles Keepax
2016-02-19 4:49 ` Anand Moon
2016-02-19 10:59 ` Sylwester Nawrocki [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=56C6F577.5050007@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=lgirdwood@gmail.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=sbkim73@samsung.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox