This is a note to let you know that I've just added the patch titled
ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-tegra-tegra_pcm_deallocate_dma_buffer-don-t-oops.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From a96edd59b2bc88b3d1ea47e0ba48076d65db9302 Mon Sep 17 00:00:00 2001
From: Stephen Warren <[email protected]>
Date: Thu, 4 Aug 2011 16:44:42 -0600
Subject: ASoC: Tegra: tegra_pcm_deallocate_dma_buffer: Don't OOPS
From: Stephen Warren <[email protected]>
commit a96edd59b2bc88b3d1ea47e0ba48076d65db9302 upstream.
Not all PCM devices have all sub-streams. Specifically, the SPDIF driver
only supports playback and hence has no capture substream. Check whether
a substream exists before dereferencing it, when de-allocating DMA
buffers in tegra_pcm_deallocate_dma_buffer.
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
sound/soc/tegra/tegra_pcm.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -309,9 +309,14 @@ static int tegra_pcm_preallocate_dma_buf
static void tegra_pcm_deallocate_dma_buffer(struct snd_pcm *pcm, int stream)
{
- struct snd_pcm_substream *substream = pcm->streams[stream].substream;
- struct snd_dma_buffer *buf = &substream->dma_buffer;
+ struct snd_pcm_substream *substream;
+ struct snd_dma_buffer *buf;
+ substream = pcm->streams[stream].substream;
+ if (!substream)
+ return;
+
+ buf = &substream->dma_buffer;
if (!buf->area)
return;
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/asoc-tegra-tegra_pcm_deallocate_dma_buffer-don-t-oops.patch
queue-3.0/asoc-tegra-wm8903-machine-driver-allow-re-insertion-of.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable