]> git.hungrycats.org Git - linux/commitdiff
staging: line6: Fix unlocked snd_pcm_stop() call
authorTakashi Iwai <tiwai@suse.de>
Thu, 11 Jul 2013 16:02:38 +0000 (18:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Mar 2014 23:10:09 +0000 (16:10 -0700)
commit 86f0b5b86d142b9323432fef078a6cf0fb5dda74 upstream.

snd_pcm_stop() must be called in the PCM substream lock context.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/line6/pcm.c

index 90d2d4475cb4eba57fbd6cb3896c614570e3bc8a..3f71e9ea051a68a0e62af229c9c0f9dbce72c3d7 100644 (file)
@@ -378,8 +378,11 @@ static int snd_line6_pcm_free(struct snd_device *device)
 */
 static void pcm_disconnect_substream(struct snd_pcm_substream *substream)
 {
-       if (substream->runtime && snd_pcm_running(substream))
+       if (substream->runtime && snd_pcm_running(substream)) {
+               snd_pcm_stream_lock_irq(substream);
                snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
+               snd_pcm_stream_unlock_irq(substream);
+       }
 }
 
 /*