From: Takashi Iwai Date: Thu, 11 Jul 2013 16:02:38 +0000 (+0200) Subject: staging: line6: Fix unlocked snd_pcm_stop() call X-Git-Tag: firefly_0821_release~176^2~5489^2~23 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=86f0b5b86d142b9323432fef078a6cf0fb5dda74;p=firefly-linux-kernel-4.4.55.git staging: line6: Fix unlocked snd_pcm_stop() call snd_pcm_stop() must be called in the PCM substream lock context. Cc: Signed-off-by: Takashi Iwai --- diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index 4795f1284906..0dd08ef51398 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -392,8 +392,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); + } } /*