lkml.org 
[lkml]   [2006]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 41/45] ALSA: Fix a deadlock in snd-rtctimer
    -stable review patch.  If anyone has any objections, please let us know.

    ------------------
    From: Takashi Iwai <tiwai@suse.de>

    [PATCH] ALSA: Fix a deadlock in snd-rtctimer

    Fix an occasional deadlock occuring with snd-rtctimer driver,
    added irqsave to the lock in tasklet (ALSA bug#952).

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jaroslav Kysela <perex@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    sound/core/timer.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- linux-2.6.17.6.orig/sound/core/timer.c
    +++ linux-2.6.17.6/sound/core/timer.c
    @@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned l
    struct snd_timer_instance *ti;
    struct list_head *p;
    unsigned long resolution, ticks;
    + unsigned long flags;

    - spin_lock(&timer->lock);
    + spin_lock_irqsave(&timer->lock, flags);
    /* now process all callbacks */
    while (!list_empty(&timer->sack_list_head)) {
    p = timer->sack_list_head.next; /* get first item */
    @@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned l
    spin_lock(&timer->lock);
    ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK;
    }
    - spin_unlock(&timer->lock);
    + spin_unlock_irqrestore(&timer->lock, flags);
    }

    /*
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-07-17 18:41    [W:0.021 / U:0.212 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site