From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20130911042853.505981414@goodmis.org> Date: Wed, 11 Sep 2013 00:27:15 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Takashi Iwai Subject: [008/251] ALSA: atiixp: Fix unlocked snd_pcm_stop() call References: <20130911042707.738353451@goodmis.org> Content-Disposition: inline; filename=0008-ALSA-atiixp-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 cc7282b8d5abbd48c81d1465925d464d9e3eaa8f ] snd_pcm_stop() must be called in the PCM substream lock context. Cc: Signed-off-by: Takashi Iwai Signed-off-by: Steven Rostedt --- sound/pci/atiixp.c | 2 ++ sound/pci/atiixp_modem.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 31020d2..1231353 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c @@ -688,7 +688,9 @@ static void snd_atiixp_xrun_dma(struct atiixp *chip, struct atiixp_dma *dma) if (! dma->substream || ! dma->running) return; snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type); + snd_pcm_stream_lock(dma->substream); snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); + snd_pcm_stream_unlock(dma->substream); } /* diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 79e204e..3662140 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c @@ -638,7 +638,9 @@ static void snd_atiixp_xrun_dma(struct atiixp_modem *chip, if (! dma->substream || ! dma->running) return; snd_printdd("atiixp-modem: XRUN detected (DMA %d)\n", dma->ops->type); + snd_pcm_stream_lock(dma->substream); snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); + snd_pcm_stream_unlock(dma->substream); } /* -- 1.7.10.4