diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-07-05 17:16:58 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-07-12 20:08:06 +0200 |
commit | 2999ff5ba12a3dce5a86acd7078fd8787623ec63 (patch) | |
tree | 2d4fe97a9e9f55f84f91518e6fa8b131e4721953 /sound | |
parent | f40b68903ccd511ea9d658b4bce319dd032a265a (diff) | |
download | talos-obmc-linux-2999ff5ba12a3dce5a86acd7078fd8787623ec63.tar.gz talos-obmc-linux-2999ff5ba12a3dce5a86acd7078fd8787623ec63.zip |
[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>
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 78199f58b93a..0a984e881c10 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -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); } /* |