aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-10-13 17:14:46 -0400
committerTakashi Iwai <tiwai@suse.de>2014-10-14 03:14:48 -0400
commit811deedebab38f8360a700a52b0b75688c9a10f7 (patch)
tree8b5ae452e128757cb5acea1ab3303dcc80c82530 /sound
parent3f4032861cfbff0b9134bf94c5c92e2146d1f068 (diff)
ALSA: pcm: Fix referred substream in snd_pcm_action_group() unlock loop
In the unlock loop of snd_pcm_action_group(), the object "s" is used as the check of nonatomic PCM, but it should be rather "s1", which is the iterator of the loop. This supposedly causes a kernel panic when the substreams in operatino are linked. Fixes: 257f8cce5d40 ('ALSA: pcm: Allow nonatomic trigger operations') Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 85fe1a216225..bfe1cf6b492f 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -818,7 +818,7 @@ static int snd_pcm_action_group(struct action_ops *ops,
818 /* unlock streams */ 818 /* unlock streams */
819 snd_pcm_group_for_each_entry(s1, substream) { 819 snd_pcm_group_for_each_entry(s1, substream) {
820 if (s1 != substream) { 820 if (s1 != substream) {
821 if (s->pcm->nonatomic) 821 if (s1->pcm->nonatomic)
822 mutex_unlock(&s1->self_group.mutex); 822 mutex_unlock(&s1->self_group.mutex);
823 else 823 else
824 spin_unlock(&s1->self_group.lock); 824 spin_unlock(&s1->self_group.lock);