diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2016-02-18 15:47:13 +0000 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-03-17 23:13:53 -0400 |
commit | ea46df70efaa589117dce85dec3e3707362e514a (patch) | |
tree | be6522b7e9fc35755eeb474e99926b7329f489f1 /net | |
parent | 7e62b968351c3759db1ad78b4aaaeff72ab2b998 (diff) |
ASoC: samsung: Use IRQ safe spin lock calls
[ Upstream commit 316fa9e09ad76e095b9d7e9350c628b918370a22 ]
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>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions