diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-07-11 17:58:47 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-08-02 22:14:58 +0200 |
commit | e93a7f00a3db345c0e2c5ab1570b4d6fec77173b (patch) | |
tree | f5ff1f3c4cfb1e28b19fb3761cde3ec35e52156c | |
parent | a4d0e7c132a92025f7c3dd7cf96bc763799ef2de (diff) |
ALSA: usx2y: Fix unlocked snd_pcm_stop() call
commit 5be1efb4c2ed79c3d7c0cbcbecae768377666e84 upstream.
snd_pcm_stop() must be called in the PCM substream lock context.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-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 6ffb3713b60..d5724d8f673 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]; |