]> Pileus Git - ~andy/linux/commitdiff
ALSA: atiixp: Fix unlocked snd_pcm_stop() call
authorTakashi Iwai <tiwai@suse.de>
Thu, 11 Jul 2013 15:56:56 +0000 (17:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 15 Jul 2013 16:12:49 +0000 (18:12 +0200)
snd_pcm_stop() must be called in the PCM substream lock context.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/atiixp.c
sound/pci/atiixp_modem.c

index fe4c61bdb8bac5764556bce3da8301653042d2c3..f6dec3ea371fa8c8e4e580af71d980e4c6595545 100644 (file)
@@ -689,7 +689,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);
 }
 
 /*
index cf29b9a1d65d71dbcc0608b1db89bef5273a199b..289563ecb6dd704e0a3f89d81ca19afef63cf98a 100644 (file)
@@ -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);
 }
 
 /*