Skip to content

Commit

Permalink
[ALSA] schedule_timeout() fix for core/seq/seq_instr.c
Browse files Browse the repository at this point in the history
Replace schedule_timeout() with schedule_timeout_uninterruptible()
to avoid signals in loop.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
Rene Herman authored and Jaroslav Kysela committed Oct 16, 2007
1 parent d86d019 commit c929e5e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sound/core/seq/seq_instr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c929e5e

Please sign in to comment.