mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
[ALSA] Fix a deadlock in snd-rtctimer
Fix a 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>
This commit is contained in:
parent
f40b68903c
commit
2999ff5ba1
1 changed files with 3 additions and 2 deletions
|
@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned long arg)
|
|||
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 long arg)
|
|||
spin_lock(&timer->lock);
|
||||
ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK;
|
||||
}
|
||||
spin_unlock(&timer->lock);
|
||||
spin_unlock_irqrestore(&timer->lock, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue