Skip to content

Commit

Permalink
[ALSA] sound/core/control.c: hard-irq-safe -> hard-irq-unsafe lock wa…
Browse files Browse the repository at this point in the history
…rning

The lock grabbed in snd_ctl_empty_read_queue() is hardirq-unsafe but we hold
an hardirq-safe one already, so make the &ctl->read_lock also hard-irq-safe.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
Borislav Petkov authored and Jaroslav Kysela committed Oct 23, 2007
1 parent 31127f2 commit 7507e8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ static int snd_ctl_open(struct inode *inode, struct file *file)

static void snd_ctl_empty_read_queue(struct snd_ctl_file * ctl)
{
unsigned long flags;
struct snd_kctl_event *cread;

spin_lock(&ctl->read_lock);
spin_lock_irqsave(&ctl->read_lock, flags);
while (!list_empty(&ctl->events)) {
cread = snd_kctl_event(ctl->events.next);
list_del(&cread->list);
kfree(cread);
}
spin_unlock(&ctl->read_lock);
spin_unlock_irqrestore(&ctl->read_lock, flags);
}

static int snd_ctl_release(struct inode *inode, struct file *file)
Expand Down

0 comments on commit 7507e8d

Please sign in to comment.