[PATCH] [UBUNTU:sound/core/] #34831: Fix hard freeze with timer {re, }store (timer)

crimsun at fungus.sh.nu crimsun at fungus.sh.nu
Wed Jul 5 04:04:35 UTC 2006


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 <crimsun at ubuntu.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            crimsun at ubuntu.com
GPG key:   www.sh.nu/~crimsun/pubkey.gpg.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060704/c1e0e09f/attachment.sig>


More information about the kernel-team mailing list