From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130911042857.597796396@goodmis.org> Date: Wed, 11 Sep 2013 00:27:39 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Takashi Iwai Subject: [032/251] staging: line6: Fix unlocked snd_pcm_stop() call References: <20130911042707.738353451@goodmis.org> Content-Disposition: inline; filename=0032-staging-line6-Fix-unlocked-snd_pcm_stop-call.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.6.11.9-rc1 stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai [ Upstream commit 86f0b5b86d142b9323432fef078a6cf0fb5dda74 ] snd_pcm_stop() must be called in the PCM substream lock context. Cc: Signed-off-by: Takashi Iwai Signed-off-by: Steven Rostedt --- drivers/staging/line6/pcm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c index 5e319e3..01f00fd 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -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); + } } /* -- 1.7.10.4