diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-09-05 21:37:16 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-09-05 21:37:16 +0200 |
commit | 9d6c9b170e5ffb54ee6697dd8e8e583121210e5b (patch) | |
tree | 66b8b01f7020e5c2ac9c767d41935617e95de031 /sound | |
parent | ac0f6b9e16a03ccfd2762eac434df0c31e092dab (diff) |
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: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/timer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index 2425b971b24..c7670f5c448 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -627,8 +627,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 */ @@ -648,7 +649,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); } /* |