diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-11 17:58:47 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-15 21:25:13 +0200 |
commit | 5be1efb4c2ed79c3d7c0cbcbecae768377666e84 (patch) | |
tree | 2677223ca7d895629e751be4e09e3c42aee6c682 | |
parent | 9538aa46c2427d6782aa10036c4da4c541605e0e (diff) | |
download | linux-5be1efb4c2ed79c3d7c0cbcbecae768377666e84.tar.gz linux-5be1efb4c2ed79c3d7c0cbcbecae768377666e84.tar.bz2 linux-5be1efb4c2ed79c3d7c0cbcbecae768377666e84.zip |
ALSA: usx2y: 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/usx2y/usbusx2yaudio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 4967fe9c938d..63fb5219f0f8 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c @@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y) struct snd_usX2Y_substream *subs = usX2Y->subs[s]; if (subs) { if (atomic_read(&subs->state) >= state_PRERUNNING) { + unsigned long flags; + + snd_pcm_stream_lock_irqsave(subs->pcm_substream, flags); snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN); + snd_pcm_stream_unlock_irqrestore(subs->pcm_substream, flags); } for (u = 0; u < NRURBS; u++) { struct urb *urb = subs->urb[u]; |