diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-07-05 11:16:58 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-07-12 14:08:06 -0400 |
commit | 2999ff5ba12a3dce5a86acd7078fd8787623ec63 (patch) | |
tree | 2d4fe97a9e9f55f84f91518e6fa8b131e4721953 /sound/core | |
parent | f40b68903ccd511ea9d658b4bce319dd032a265a (diff) |
[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/core')
-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) | |||
628 | struct snd_timer_instance *ti; | 628 | struct snd_timer_instance *ti; |
629 | struct list_head *p; | 629 | struct list_head *p; |
630 | unsigned long resolution, ticks; | 630 | unsigned long resolution, ticks; |
631 | unsigned long flags; | ||
631 | 632 | ||
632 | spin_lock(&timer->lock); | 633 | spin_lock_irqsave(&timer->lock, flags); |
633 | /* now process all callbacks */ | 634 | /* now process all callbacks */ |
634 | while (!list_empty(&timer->sack_list_head)) { | 635 | while (!list_empty(&timer->sack_list_head)) { |
635 | p = timer->sack_list_head.next; /* get first item */ | 636 | p = timer->sack_list_head.next; /* get first item */ |
@@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned long arg) | |||
649 | spin_lock(&timer->lock); | 650 | spin_lock(&timer->lock); |
650 | ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK; | 651 | ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK; |
651 | } | 652 | } |
652 | spin_unlock(&timer->lock); | 653 | spin_unlock_irqrestore(&timer->lock, flags); |
653 | } | 654 | } |
654 | 655 | ||
655 | /* | 656 | /* |