List Info

Thread: #34831: Fix hard freeze with timer {re, }store (timer)




#34831: Fix hard freeze with timer {re, }store (timer)
user name
2006-07-05 04:04:35
Subject: [PATCH] [UBUNTU:sound/core/] #34831: Fix hard
freeze with timer {re,}store (timer)

UpstreamStatus: Not yet merged, https://bugtrack.alsa-project.org/alsa-bug/view.php?id
=952

Lee Revell provided this patch to fix a system freeze
exhibited in
LP #34831, which can now be closed.

Signed-off-by: Daniel T Chen <crimsunubuntu.com>

---

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

6e7a1721659cd8cc1e1363f59d81179d0df6e300
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 1b90a38..1e6613a 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
 -628,8
+628,9  static void snd_timer_tasklet(unsigned l
 	snd_timer_instance_t *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);
 }
 
 /*
-- 
1.1.3


-- 
Daniel T. Chen            crimsunubuntu.com
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-- 
kernel-team mailing list
kernel-teamlists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )