Commit c929e5ef authored by Rene Herman's avatar Rene Herman Committed by Jaroslav Kysela

[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: default avatarRene Herman <rene.herman@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent d86d0193
...@@ -109,7 +109,7 @@ void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr) ...@@ -109,7 +109,7 @@ void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr)
spin_lock_irqsave(&list->lock, flags); spin_lock_irqsave(&list->lock, flags);
while (instr->use) { while (instr->use) {
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
schedule_timeout(1); schedule_timeout_uninterruptible(1);
spin_lock_irqsave(&list->lock, flags); spin_lock_irqsave(&list->lock, flags);
} }
spin_unlock_irqrestore(&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, ...@@ -198,8 +198,10 @@ int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
while (flist) { while (flist) {
instr = flist; instr = flist;
flist = instr->next; flist = instr->next;
while (instr->use) while (instr->use) {
schedule_timeout(1); schedule_timeout_uninterruptible(1);
barrier();
}
if (snd_seq_instr_free(instr, atomic)<0) if (snd_seq_instr_free(instr, atomic)<0)
snd_printk(KERN_WARNING "instrument free problem\n"); snd_printk(KERN_WARNING "instrument free problem\n");
instr = next; instr = next;
...@@ -555,7 +557,7 @@ static int instr_free(struct snd_seq_kinstr_ops *ops, ...@@ -555,7 +557,7 @@ static int instr_free(struct snd_seq_kinstr_ops *ops,
SNDRV_SEQ_INSTR_NOTIFY_REMOVE); SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
while (instr->use) { while (instr->use) {
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
schedule_timeout(1); schedule_timeout_uninterruptible(1);
spin_lock_irqsave(&list->lock, flags); spin_lock_irqsave(&list->lock, flags);
} }
spin_unlock_irqrestore(&list->lock, flags); spin_unlock_irqrestore(&list->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment