diff options
| author | Takashi Iwai <tiwai@suse.de> | 2013-07-11 11:57:55 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2013-07-15 12:12:50 -0400 |
| commit | 5b9ab3f7324a1b94a5a5a76d44cf92dfeb3b5e80 (patch) | |
| tree | 14f3e2848576f2a15a36ff2e1f2877483fe52356 | |
| parent | cc7282b8d5abbd48c81d1465925d464d9e3eaa8f (diff) | |
ALSA: 6fire: Fix unlocked snd_pcm_stop() call
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>
| -rw-r--r-- | sound/usb/6fire/pcm.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/usb/6fire/pcm.c b/sound/usb/6fire/pcm.c index c5b9cac37dc4..2aa4e13063a8 100644 --- a/sound/usb/6fire/pcm.c +++ b/sound/usb/6fire/pcm.c | |||
| @@ -639,17 +639,25 @@ int usb6fire_pcm_init(struct sfire_chip *chip) | |||
| 639 | void usb6fire_pcm_abort(struct sfire_chip *chip) | 639 | void usb6fire_pcm_abort(struct sfire_chip *chip) |
| 640 | { | 640 | { |
| 641 | struct pcm_runtime *rt = chip->pcm; | 641 | struct pcm_runtime *rt = chip->pcm; |
| 642 | unsigned long flags; | ||
| 642 | int i; | 643 | int i; |
| 643 | 644 | ||
| 644 | if (rt) { | 645 | if (rt) { |
| 645 | rt->panic = true; | 646 | rt->panic = true; |
| 646 | 647 | ||
| 647 | if (rt->playback.instance) | 648 | if (rt->playback.instance) { |
| 649 | snd_pcm_stream_lock_irqsave(rt->playback.instance, flags); | ||
| 648 | snd_pcm_stop(rt->playback.instance, | 650 | snd_pcm_stop(rt->playback.instance, |
| 649 | SNDRV_PCM_STATE_XRUN); | 651 | SNDRV_PCM_STATE_XRUN); |
| 650 | if (rt->capture.instance) | 652 | snd_pcm_stream_unlock_irqrestore(rt->playback.instance, flags); |
| 653 | } | ||
| 654 | |||
| 655 | if (rt->capture.instance) { | ||
| 656 | snd_pcm_stream_lock_irqsave(rt->capture.instance, flags); | ||
| 651 | snd_pcm_stop(rt->capture.instance, | 657 | snd_pcm_stop(rt->capture.instance, |
| 652 | SNDRV_PCM_STATE_XRUN); | 658 | SNDRV_PCM_STATE_XRUN); |
| 659 | snd_pcm_stream_unlock_irqrestore(rt->capture.instance, flags); | ||
| 660 | } | ||
| 653 | 661 | ||
| 654 | for (i = 0; i < PCM_N_URBS; i++) { | 662 | for (i = 0; i < PCM_N_URBS; i++) { |
| 655 | usb_poison_urb(&rt->in_urbs[i].instance); | 663 | usb_poison_urb(&rt->in_urbs[i].instance); |
