Patch "ALSA: 6fire: Fix unlocked snd_pcm_stop() call" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: 6fire: Fix unlocked snd_pcm_stop() call

to the 3.4-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:
     alsa-6fire-fix-unlocked-snd_pcm_stop-call.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 28518ed66242869c1b04ab40d4e84ce5fedb0c56 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@xxxxxxx>
Date: Thu, 11 Jul 2013 17:57:55 +0200
Subject: ALSA: 6fire: Fix unlocked snd_pcm_stop() call

From: Takashi Iwai <tiwai@xxxxxxx>

commit 5b9ab3f7324a1b94a5a5a76d44cf92dfeb3b5e80 upstream.

snd_pcm_stop() must be called in the PCM substream lock context.

Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Cc: Weng Meiling <wengmeiling.weng@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 sound/usb/6fire/pcm.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/sound/usb/6fire/pcm.c
+++ b/sound/usb/6fire/pcm.c
@@ -639,17 +639,25 @@ int __devinit usb6fire_pcm_init(struct s
 void usb6fire_pcm_abort(struct sfire_chip *chip)
 {
 	struct pcm_runtime *rt = chip->pcm;
+	unsigned long flags;
 	int i;
 
 	if (rt) {
 		rt->panic = true;
 
-		if (rt->playback.instance)
+		if (rt->playback.instance) {
+			snd_pcm_stream_lock_irqsave(rt->playback.instance, flags);
 			snd_pcm_stop(rt->playback.instance,
 					SNDRV_PCM_STATE_XRUN);
-		if (rt->capture.instance)
+			snd_pcm_stream_unlock_irqrestore(rt->playback.instance, flags);
+		}
+
+		if (rt->capture.instance) {
+			snd_pcm_stream_lock_irqsave(rt->capture.instance, flags);
 			snd_pcm_stop(rt->capture.instance,
 					SNDRV_PCM_STATE_XRUN);
+			snd_pcm_stream_unlock_irqrestore(rt->capture.instance, flags);
+		}
 
 		for (i = 0; i < PCM_N_URBS; i++) {
 			usb_poison_urb(&rt->in_urbs[i].instance);


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-3.4/asoc-sta32x-fix-wrong-enum-for-limiter2-release-rate.patch
queue-3.4/saa7134-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/asoc-wm8770-fix-wrong-number-of-enum-items.patch
queue-3.4/alsa-usb-audio-work-around-kef-x300a-firmware-bug.patch
queue-3.4/alsa-usx2y-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/staging-line6-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/asoc-s6000-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/alsa-atiixp-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/alsa-6fire-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/alsa-pxa2xx-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/alsa-ua101-fix-unlocked-snd_pcm_stop-call.patch
queue-3.4/asoc-sta32x-fix-array-access-overflow.patch
queue-3.4/alsa-asihpi-fix-unlocked-snd_pcm_stop-call.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]