lkml.org 
[lkml]   [2013]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[46/84] ALSA: usx2y: Fix unlocked snd_pcm_stop() call
    3.2.50-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Takashi Iwai <tiwai@suse.de>

    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>
    ---
    sound/usb/usx2y/usbusx2yaudio.c | 4 ++++
    1 file changed, 4 insertions(+)

    --- a/sound/usb/usx2y/usbusx2yaudio.c
    +++ b/sound/usb/usx2y/usbusx2yaudio.c
    @@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct us
    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];


    \
     
     \ /
      Last update: 2013-07-31 16:01    [W:4.039 / U:0.204 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site