Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c929e5ef4f1b2ef52f707e7ffcedc492a199741e
Commit:     c929e5ef4f1b2ef52f707e7ffcedc492a199741e
Parent:     d86d01935a4c4c818514d8c23579703abd768329
Author:     Rene Herman <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 18 18:33:15 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 16:50:55 2007 +0200

    [ALSA] schedule_timeout() fix for core/seq/seq_instr.c
    
    Replace schedule_timeout() with schedule_timeout_uninterruptible()
    to avoid signals in loop.
    
    Signed-off-by: Rene Herman <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/core/seq/seq_instr.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c
index 5efe652..08bed00 100644
--- a/sound/core/seq/seq_instr.c
+++ b/sound/core/seq/seq_instr.c
@@ -109,7 +109,7 @@ void snd_seq_instr_list_free(struct snd_seq_kinstr_list 
**list_ptr)
                        spin_lock_irqsave(&list->lock, flags);
                        while (instr->use) {
                                spin_unlock_irqrestore(&list->lock, flags);
-                               schedule_timeout(1);
+                               schedule_timeout_uninterruptible(1);
                                spin_lock_irqsave(&list->lock, flags);
                        }                               
                        spin_unlock_irqrestore(&list->lock, flags);
@@ -198,8 +198,10 @@ int snd_seq_instr_list_free_cond(struct 
snd_seq_kinstr_list *list,
                while (flist) {
                        instr = flist;
                        flist = instr->next;
-                       while (instr->use)
-                               schedule_timeout(1);
+                       while (instr->use) {
+                               schedule_timeout_uninterruptible(1);
+                               barrier();
+                       }
                        if (snd_seq_instr_free(instr, atomic)<0)
                                snd_printk(KERN_WARNING "instrument free 
problem\n");
                        instr = next;
@@ -555,7 +557,7 @@ static int instr_free(struct snd_seq_kinstr_ops *ops,
                                           SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
                while (instr->use) {
                        spin_unlock_irqrestore(&list->lock, flags);
-                       schedule_timeout(1);
+                       schedule_timeout_uninterruptible(1);
                        spin_lock_irqsave(&list->lock, flags);
                }                               
                spin_unlock_irqrestore(&list->lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to